diff options
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); |