diff options
author | Florian Dold <florian.dold@gmail.com> | 2020-07-21 12:23:48 +0530 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2020-07-21 12:23:48 +0530 |
commit | f4a8702b3cf93f9edf96d1d1c8cb88baa309e301 (patch) | |
tree | ec8c62271e7f220da32858a04c901b1962d2b4b3 /src/operations/history.ts | |
parent | dd2efc3d78f2dfda44f8182f9638723dcb839781 (diff) | |
download | wallet-core-f4a8702b3cf93f9edf96d1d1c8cb88baa309e301.tar.xz |
towards consuming new merchant API
Diffstat (limited to 'src/operations/history.ts')
-rw-r--r-- | src/operations/history.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/operations/history.ts b/src/operations/history.ts index f04dad113..9cbbd5163 100644 --- a/src/operations/history.ts +++ b/src/operations/history.ts @@ -246,7 +246,7 @@ export async function getHistory( contribution: string; denomPub: string; }[] = []; - for (const x of purchase.payReq.coins) { + for (const x of purchase.coinDepositPermissions) { const c = await tx.get(Stores.coins, x.coin_pub); if (!c) { // FIXME: what to do here?? @@ -269,7 +269,7 @@ export async function getHistory( verboseDetails = { coins }; } const amountPaidWithFees = Amounts.sum( - purchase.payReq.coins.map((x) => + purchase.coinDepositPermissions.map((x) => Amounts.parseOrThrow(x.contribution), ), ).amount; @@ -280,7 +280,7 @@ export async function getHistory( replay: pe.isReplay, sessionId: pe.sessionId, timestamp: pe.timestamp, - numCoins: purchase.payReq.coins.length, + numCoins: purchase.coinDepositPermissions.length, amountPaidWithFees: Amounts.stringify(amountPaidWithFees), verboseDetails, }); |