Added ability to remove exposure

This commit is contained in:
QiTao Weng 2021-04-11 02:45:22 +00:00
parent 0580d2274f
commit c66baddc50

View File

@ -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())
})
}