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/pay.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/pay.ts')
-rw-r--r-- | src/operations/pay.ts | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/operations/pay.ts b/src/operations/pay.ts index 664524695..b0f1d4b62 100644 --- a/src/operations/pay.ts +++ b/src/operations/pay.ts @@ -345,8 +345,8 @@ async function recordConfirmPay( lastSessionId: sessionId, merchantSig: d.merchantSig, payReq, - acceptTimestamp: getTimestampNow(), - lastRefundStatusTimestamp: undefined, + timestampAccept: getTimestampNow(), + timestampLastRefundStatus: undefined, proposalId: proposal.proposalId, lastPayError: undefined, lastRefundStatusError: undefined, @@ -355,7 +355,7 @@ async function recordConfirmPay( refundStatusRequested: false, lastRefundApplyError: undefined, refundApplyRetryInfo: initRetryInfo(), - firstSuccessfulPayTimestamp: undefined, + timestampFirstSuccessfulPay: undefined, autoRefundDeadline: undefined, paymentSubmitPending: true, refundState: { @@ -421,7 +421,7 @@ export async function abortFailedPayment( if (!purchase) { throw Error("Purchase not found, unable to abort with refund"); } - if (purchase.firstSuccessfulPayTimestamp) { + if (purchase.timestampFirstSuccessfulPay) { throw Error("Purchase already finished, not aborting"); } if (purchase.abortDone) { @@ -725,8 +725,8 @@ export async function submitPay( // FIXME: properly display error throw Error("merchant payment signature invalid"); } - const isFirst = purchase.firstSuccessfulPayTimestamp === undefined; - purchase.firstSuccessfulPayTimestamp = now; + const isFirst = purchase.timestampFirstSuccessfulPay === undefined; + purchase.timestampFirstSuccessfulPay = now; purchase.paymentSubmitPending = false; purchase.lastPayError = undefined; purchase.payRetryInfo = initRetryInfo(false); |