diff options
author | Florian Dold <florian.dold@gmail.com> | 2018-04-09 00:20:54 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2018-04-09 00:20:54 +0200 |
commit | 6533716fac07e4988ef94231a0c0c8aba68e0d5e (patch) | |
tree | 2255e2f1775c050cc638e5de2ca4db8f0da956b8 /src/wallet.ts | |
parent | 3570e36baa8e407cbfe3e729a638fd8b2d8b22d9 (diff) | |
download | wallet-core-6533716fac07e4988ef94231a0c0c8aba68e0d5e.tar.xz |
prevent race condition where we can accept tip before the background page knows about it
Diffstat (limited to 'src/wallet.ts')
-rw-r--r-- | src/wallet.ts | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/wallet.ts b/src/wallet.ts index 7c8aa7729..1d15722e3 100644 --- a/src/wallet.ts +++ b/src/wallet.ts @@ -2801,6 +2801,7 @@ export class Wallet { let merchantResp; tipRecord = await this.q().putOrGetExisting(Stores.tips, tipRecord, [tipRecord.tipId, merchantDomain]); + this.notifier.notify(); // Planchets in the form that the merchant expects const planchetsDetail: TipPlanchetDetail[] = tipRecord.planchets.map((p) => ({ @@ -2846,6 +2847,7 @@ export class Wallet { tipRecord.pickedUp = true; await this.q().put(Stores.tips, tipRecord).finish(); + this.notifier.notify(); return tipRecord; } |