aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-harness/src/integrationtests/test-payment-template.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2024-01-30 22:25:54 +0100
committerFlorian Dold <florian@dold.me>2024-01-30 22:25:54 +0100
commitc5f97c8f493b52f9e083548d0ac71592c56a2b79 (patch)
treed45ed40257d77880157a61919140d6e972bc60f1 /packages/taler-harness/src/integrationtests/test-payment-template.ts
parentd4429ff5acac01c5a7ef32efa3b3f2402627a71a (diff)
downloadwallet-core-c5f97c8f493b52f9e083548d0ac71592c56a2b79.tar.xz
harness: work on otp test
Diffstat (limited to 'packages/taler-harness/src/integrationtests/test-payment-template.ts')
-rw-r--r--packages/taler-harness/src/integrationtests/test-payment-template.ts6
1 files changed, 4 insertions, 2 deletions
diff --git a/packages/taler-harness/src/integrationtests/test-payment-template.ts b/packages/taler-harness/src/integrationtests/test-payment-template.ts
index e77236a9a..c9f1caacd 100644
--- a/packages/taler-harness/src/integrationtests/test-payment-template.ts
+++ b/packages/taler-harness/src/integrationtests/test-payment-template.ts
@@ -22,6 +22,7 @@ import {
Duration,
MerchantApiClient,
PreparePayResultType,
+ narrowOpSuccessOrThrow,
} from "@gnu-taler/taler-util";
import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
import { GlobalTestState } from "../harness/harness.js";
@@ -41,7 +42,7 @@ export async function runPaymentTemplateTest(t: GlobalTestState) {
const merchantClient = new MerchantApiClient(merchant.makeInstanceBaseUrl());
- await merchantClient.createTemplate({
+ const createTemplateRes = await merchantClient.createTemplate({
template_id: "template1",
template_description: "my test template",
template_contract: {
@@ -54,6 +55,7 @@ export async function runPaymentTemplateTest(t: GlobalTestState) {
summary: "hello, I'm a summary",
},
});
+ narrowOpSuccessOrThrow(createTemplateRes);
// Withdraw digital cash into the wallet.
@@ -84,7 +86,7 @@ export async function runPaymentTemplateTest(t: GlobalTestState) {
// Pay for it
const r2 = await walletClient.call(WalletApiOperation.ConfirmPay, {
- proposalId: preparePayResult.proposalId,
+ transactionId: preparePayResult.transactionId,
});
t.assertTrue(r2.type === ConfirmPayResultType.Done);