From 3cb0a91d2aa23538b106fa46aca58440e8cdde2a Mon Sep 17 00:00:00 2001 From: QiTao Weng Date: Sun, 11 Apr 2021 02:52:09 +0000 Subject: [PATCH] Fix param in remove exposure --- src/app/units/rtdb/Exposure.ts | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/src/app/units/rtdb/Exposure.ts b/src/app/units/rtdb/Exposure.ts index 59940e5..4a3248b 100644 --- a/src/app/units/rtdb/Exposure.ts +++ b/src/app/units/rtdb/Exposure.ts @@ -46,21 +46,9 @@ 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') - - const exposure: ExposureResourceItem = snapshot.val() - - // Push the exposure transactions onto the chain - await this.blockchain.submitExposures(exposure) - - if ( snapshot.key ) - await ( this.make(ExposureResource)).ref().child(snapshot.key).remove() - - this.release() - // await this.firebase.unlock('block')*/ + if (snapshot.key) { + this.firebase.ref('exposure').child(snapshot.key).remove() + } }) }