From f4a8702b3cf93f9edf96d1d1c8cb88baa309e301 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Tue, 21 Jul 2020 12:23:48 +0530 Subject: towards consuming new merchant API --- src/operations/history.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/operations/history.ts') 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, }); -- cgit v1.2.3