summaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2024-02-04 17:02:39 -0300
committerSebastian <sebasjm@gmail.com>2024-02-04 17:02:39 -0300
commit426e2f3170de3ed41fa857661753435bd962b746 (patch)
tree19066046157ec9639f8eab8d3ca8a9d3122c17a7 /packages
parentbda2474d19eea56468c56f204ec26e70807945f5 (diff)
downloadwallet-core-426e2f3170de3ed41fa857661753435bd962b746.tar.gz
wallet-core-426e2f3170de3ed41fa857661753435bd962b746.tar.bz2
wallet-core-426e2f3170de3ed41fa857661753435bd962b746.zip
update intragration test to use non-deprecated acceptReward request
Diffstat (limited to 'packages')
-rw-r--r--packages/taler-harness/src/integrationtests/test-tipping.ts3
-rw-r--r--packages/taler-wallet-webextension/src/cta/Reward/state.ts5
-rw-r--r--packages/taler-wallet-webextension/src/cta/Reward/test.ts10
3 files changed, 10 insertions, 8 deletions
diff --git a/packages/taler-harness/src/integrationtests/test-tipping.ts b/packages/taler-harness/src/integrationtests/test-tipping.ts
index 16859f98c..543e7a68b 100644
--- a/packages/taler-harness/src/integrationtests/test-tipping.ts
+++ b/packages/taler-harness/src/integrationtests/test-tipping.ts
@@ -23,6 +23,7 @@ import {
TransactionMajorState,
WireGatewayApiClient,
AmountString,
+ TransactionIdStr,
} from "@gnu-taler/taler-util";
import {
WalletApiOperation,
@@ -109,7 +110,7 @@ export async function runTippingTest(t: GlobalTestState) {
t.assertAmountEquals(ptr.rewardAmountEffective, "TESTKUDOS:4.85");
await walletClient.call(WalletApiOperation.AcceptReward, {
- walletRewardId: ptr.walletRewardId,
+ transactionId: ptr.transactionId,
});
await walletClient.call(
diff --git a/packages/taler-wallet-webextension/src/cta/Reward/state.ts b/packages/taler-wallet-webextension/src/cta/Reward/state.ts
index a71ad6acc..a4244a444 100644
--- a/packages/taler-wallet-webextension/src/cta/Reward/state.ts
+++ b/packages/taler-wallet-webextension/src/cta/Reward/state.ts
@@ -14,7 +14,7 @@
GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
*/
-import { Amounts } from "@gnu-taler/taler-util";
+import { Amounts, TransactionIdStr } from "@gnu-taler/taler-util";
import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
import { alertFromError, useAlertContext } from "../../context/alert.js";
import { useBackendContext } from "../../context/backend.js";
@@ -63,8 +63,9 @@ export function useComponentState({
const { tip } = tipInfo.response;
const doAccept = async (): Promise<void> => {
+
const res = await api.wallet.call(WalletApiOperation.AcceptReward, {
- walletRewardId: tip.transactionId,
+ transactionId: tip.transactionId,
});
//FIX: this may not be seen since we are moving to the success also
diff --git a/packages/taler-wallet-webextension/src/cta/Reward/test.ts b/packages/taler-wallet-webextension/src/cta/Reward/test.ts
index 0e378f366..aa19af261 100644
--- a/packages/taler-wallet-webextension/src/cta/Reward/test.ts
+++ b/packages/taler-wallet-webextension/src/cta/Reward/test.ts
@@ -19,7 +19,7 @@
* @author Sebastian Javier Marchano (sebasjm)
*/
-import { AmountString, Amounts } from "@gnu-taler/taler-util";
+import { AmountString, Amounts, TransactionIdStr } from "@gnu-taler/taler-util";
import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
import { expect } from "chai";
import * as tests from "@gnu-taler/web-util/testing";
@@ -68,7 +68,7 @@ describe("Tip CTA states", () => {
merchantBaseUrl: "merchant url",
rewardAmountEffective: "EUR:1" as AmountString,
walletRewardId: "tip_id",
- transactionId: "txn:tip:ABC1234",
+ transactionId: "txn:tip:ABC1234" as TransactionIdStr,
expirationTimestamp: {
t_s: 1,
},
@@ -112,7 +112,7 @@ describe("Tip CTA states", () => {
merchantBaseUrl: "merchant url",
rewardAmountEffective: "EUR:1" as AmountString,
walletRewardId: "tip_id",
- transactionId: "txn:tip:ABC1234",
+ transactionId: "txn:tip:ABC1234" as TransactionIdStr,
expirationTimestamp: {
t_s: 1,
},
@@ -142,7 +142,7 @@ describe("Tip CTA states", () => {
merchantBaseUrl: "merchant url",
rewardAmountEffective: "EUR:1" as AmountString,
walletRewardId: "tip_id",
- transactionId: "txn:tip:ABC1234",
+ transactionId: "txn:tip:ABC1234" as TransactionIdStr,
accepted: false,
expirationTimestamp: {
t_s: 1,
@@ -190,7 +190,7 @@ describe("Tip CTA states", () => {
merchantBaseUrl: "merchant url",
rewardAmountEffective: "EUR:1" as AmountString,
walletRewardId: "tip_id",
- transactionId: "txn:tip:ABC1234",
+ transactionId: "txn:tip:ABC1234" as TransactionIdStr,
expirationTimestamp: {
t_s: 1,
},