From c66baddc506f406aa10112e6ba5ad99eff78210c Mon Sep 17 00:00:00 2001 From: QiTao Weng Date: Sun, 11 Apr 2021 02:45:22 +0000 Subject: [PATCH] Added ability to remove exposure --- src/app/units/rtdb/Exposure.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/units/rtdb/Exposure.ts b/src/app/units/rtdb/Exposure.ts index 50ddd5a..59940e5 100644 --- a/src/app/units/rtdb/Exposure.ts +++ b/src/app/units/rtdb/Exposure.ts @@ -45,6 +45,8 @@ export class Exposure extends Unit { */ public async up() { this.firebase.ref('exposure').on('child_added', (snapshot) => { + this.blockchain.submitExposures(snapshot.val()) + this.firebase.ref('exposure').child(snapshot.val()).remove() /*this.logging.debug('Received child_added event for exposures reference.') if ( !this.claim() ) return // await this.firebase.trylock('block', 'Exposure_child_added') @@ -59,8 +61,6 @@ export class Exposure extends Unit { this.release() // await this.firebase.unlock('block')*/ - - this.blockchain.submitExposures(snapshot.val()) }) }