summaryrefslogtreecommitdiff
path: root/src/operations/history.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2020-07-21 12:23:48 +0530
committerFlorian Dold <florian.dold@gmail.com>2020-07-21 12:23:48 +0530
commitf4a8702b3cf93f9edf96d1d1c8cb88baa309e301 (patch)
treeec8c62271e7f220da32858a04c901b1962d2b4b3 /src/operations/history.ts
parentdd2efc3d78f2dfda44f8182f9638723dcb839781 (diff)
downloadwallet-core-f4a8702b3cf93f9edf96d1d1c8cb88baa309e301.tar.gz
wallet-core-f4a8702b3cf93f9edf96d1d1c8cb88baa309e301.tar.bz2
wallet-core-f4a8702b3cf93f9edf96d1d1c8cb88baa309e301.zip
towards consuming new merchant API
Diffstat (limited to 'src/operations/history.ts')
-rw-r--r--src/operations/history.ts6
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,
});