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/refresh.ts | |
parent | fa4621e70c48500a372504eb8ae9b9481531c555 (diff) | |
download | wallet-core-35a7b76a7d935dc2c749fd39ac80c6af1096b795.tar.gz wallet-core-35a7b76a7d935dc2c749fd39ac80c6af1096b795.tar.bz2 wallet-core-35a7b76a7d935dc2c749fd39ac80c6af1096b795.zip |
history WIP, DB naming
Diffstat (limited to 'src/operations/refresh.ts')
-rw-r--r-- | src/operations/refresh.ts | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/operations/refresh.ts b/src/operations/refresh.ts index d9a080bd8..f602221af 100644 --- a/src/operations/refresh.ts +++ b/src/operations/refresh.ts @@ -168,7 +168,7 @@ async function refreshCreateSession( if (!c) { throw Error("coin not found, but marked for refresh"); } - const r = Amounts.sub(c.currentAmount, refreshSession.valueWithFee); + const r = Amounts.sub(c.currentAmount, refreshSession.amountRefreshInput); if (r.saturated) { console.log("can't refresh coin, no amount left"); return; @@ -224,7 +224,7 @@ async function refreshMelt( denom_pub_hash: coin.denomPubHash, denom_sig: coin.denomSig, rc: refreshSession.hash, - value_with_fee: refreshSession.valueWithFee, + value_with_fee: refreshSession.amountRefreshInput, }; logger.trace("melt request:", meltReq); const resp = await ws.http.postJson(reqUrl.href, meltReq); @@ -414,7 +414,7 @@ async function refreshReveal( } } if (allDone) { - rg.finishedTimestamp = getTimestampNow(); + rg.timestampFinished = getTimestampNow(); rg.retryInfo = initRetryInfo(false); } for (let coin of coins) { @@ -489,7 +489,7 @@ async function processRefreshGroupImpl( if (!refreshGroup) { return; } - if (refreshGroup.finishedTimestamp) { + if (refreshGroup.timestampFinished) { return; } const ps = refreshGroup.oldCoinPubs.map((x, i) => @@ -545,7 +545,7 @@ export async function createRefreshGroup( const refreshGroupId = encodeCrock(getRandomBytes(32)); const refreshGroup: RefreshGroupRecord = { - finishedTimestamp: undefined, + timestampFinished: undefined, finishedPerCoin: oldCoinPubs.map(x => false), lastError: undefined, lastErrorPerCoin: {}, |