diff options
author | Florian Dold <florian.dold@gmail.com> | 2019-12-16 12:53:22 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2019-12-16 12:53:22 +0100 |
commit | fa4621e70c48500a372504eb8ae9b9481531c555 (patch) | |
tree | 50c457c8c2133dfec32cb465e1b3902ce88fb209 /src/operations/tip.ts | |
parent | 1b9c5855a8afb6833ff7a706f5bed5650e1191ad (diff) | |
download | wallet-core-fa4621e70c48500a372504eb8ae9b9481531c555.tar.xz |
history events WIP
Diffstat (limited to 'src/operations/tip.ts')
-rw-r--r-- | src/operations/tip.ts | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/operations/tip.ts b/src/operations/tip.ts index f9953b513..ba4b80974 100644 --- a/src/operations/tip.ts +++ b/src/operations/tip.ts @@ -68,7 +68,8 @@ export async function getTipStatus( tipRecord = { tipId, - accepted: false, + acceptedTimestamp: undefined, + rejectedTimestamp: undefined, amount, deadline: extractTalerStampOrThrow(tipPickupStatus.stamp_expire), exchangeUrl: tipPickupStatus.exchange_url, @@ -90,7 +91,7 @@ export async function getTipStatus( } const tipStatus: TipStatus = { - accepted: !!tipRecord && tipRecord.accepted, + accepted: !!tipRecord && !!tipRecord.acceptedTimestamp, amount: Amounts.parseOrThrow(tipPickupStatus.amount), amountLeft: Amounts.parseOrThrow(tipPickupStatus.amount_left), exchangeUrl: tipPickupStatus.exchange_url, @@ -259,7 +260,7 @@ async function processTipImpl( rawWithdrawalAmount: tipRecord.amount, withdrawn: planchets.map((x) => false), totalCoinValue: Amounts.sum(planchets.map((p) => p.coinValue)).amount, - lastCoinErrors: planchets.map((x) => undefined), + lastErrorPerCoin: {}, retryInfo: initRetryInfo(), finishTimestamp: undefined, lastError: undefined, @@ -296,7 +297,7 @@ export async function acceptTip( return; } - tipRecord.accepted = true; + tipRecord.acceptedTimestamp = getTimestampNow(); await ws.db.put(Stores.tips, tipRecord); await processTip(ws, tipId); |