diff options
author | Florian Dold <florian.dold@gmail.com> | 2019-12-16 16:20:45 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2019-12-16 16:20:45 +0100 |
commit | 35a7b76a7d935dc2c749fd39ac80c6af1096b795 (patch) | |
tree | b7f0bb167d3c912a085e7b842e887d5c834208fb /src/operations/withdraw.ts | |
parent | fa4621e70c48500a372504eb8ae9b9481531c555 (diff) | |
download | wallet-core-35a7b76a7d935dc2c749fd39ac80c6af1096b795.tar.xz |
history WIP, DB naming
Diffstat (limited to 'src/operations/withdraw.ts')
-rw-r--r-- | src/operations/withdraw.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/operations/withdraw.ts b/src/operations/withdraw.ts index c7c91494c..6e7cdf512 100644 --- a/src/operations/withdraw.ts +++ b/src/operations/withdraw.ts @@ -280,7 +280,7 @@ async function processPlanchet( } } if (numDone === ws.denoms.length) { - ws.finishTimestamp = getTimestampNow(); + ws.timestampFinish = getTimestampNow(); ws.lastError = undefined; ws.retryInfo = initRetryInfo(false); withdrawSessionFinished = true; @@ -289,11 +289,11 @@ async function processPlanchet( if (!planchet.isFromTip) { const r = await tx.get(Stores.reserves, planchet.reservePub); if (r) { - r.withdrawCompletedAmount = Amounts.add( - r.withdrawCompletedAmount, + r.amountWithdrawCompleted = Amounts.add( + r.amountWithdrawCompleted, Amounts.add(denom.value, denom.feeWithdraw).amount, ).amount; - if (Amounts.cmp(r.withdrawCompletedAmount, r.withdrawAllocatedAmount) == 0) { + if (Amounts.cmp(r.amountWithdrawCompleted, r.amountWithdrawAllocated) == 0) { reserveDepleted = true; } await tx.put(Stores.reserves, r); |