summaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2023-05-07 22:16:33 +0200
committerFlorian Dold <florian@dold.me>2023-05-07 22:16:33 +0200
commit99b844b465c8fb7b9329ea109c8183e9d7f6e3c9 (patch)
treee6407a33b421ae6527b599cc5b5938cb32f6830c /packages
parent7f0edb6a783d9a50f94f65c815c1280baecaac89 (diff)
downloadwallet-core-99b844b465c8fb7b9329ea109c8183e9d7f6e3c9.tar.gz
wallet-core-99b844b465c8fb7b9329ea109c8183e9d7f6e3c9.tar.bz2
wallet-core-99b844b465c8fb7b9329ea109c8183e9d7f6e3c9.zip
-test fixes
Diffstat (limited to 'packages')
-rw-r--r--packages/taler-harness/src/integrationtests/test-refund-gone.ts7
-rw-r--r--packages/taler-harness/src/integrationtests/test-refund-incremental.ts11
-rw-r--r--packages/taler-wallet-core/src/operations/transactions.ts2
3 files changed, 9 insertions, 11 deletions
diff --git a/packages/taler-harness/src/integrationtests/test-refund-gone.ts b/packages/taler-harness/src/integrationtests/test-refund-gone.ts
index 7fd5b0aac..7bebd6239 100644
--- a/packages/taler-harness/src/integrationtests/test-refund-gone.ts
+++ b/packages/taler-harness/src/integrationtests/test-refund-gone.ts
@@ -103,13 +103,10 @@ export async function runRefundGoneTest(t: GlobalTestState) {
console.log(ref);
- let rr = await wallet.client.call(WalletApiOperation.AcceptPurchaseRefund, {
- transactionId: ref.talerRefundUri,
+ await wallet.client.call(WalletApiOperation.StartRefundQuery, {
+ transactionId: r1.transactionId,
});
- console.log("refund response:", rr);
- t.assertAmountEquals(rr.amountRefundGone, "TESTKUDOS:5");
-
await wallet.runUntilDone();
let r = await wallet.client.call(WalletApiOperation.GetBalances, {});
diff --git a/packages/taler-harness/src/integrationtests/test-refund-incremental.ts b/packages/taler-harness/src/integrationtests/test-refund-incremental.ts
index 385bff8cb..c8fcfc831 100644
--- a/packages/taler-harness/src/integrationtests/test-refund-incremental.ts
+++ b/packages/taler-harness/src/integrationtests/test-refund-incremental.ts
@@ -94,9 +94,10 @@ export async function runRefundIncrementalTest(t: GlobalTestState) {
console.log("first refund increase response", ref);
{
- let wr = await wallet.client.call(WalletApiOperation.AcceptPurchaseRefund, {
- transactionId: ref.talerRefundUri,
+ let wr = await wallet.client.call(WalletApiOperation.StartRefundQuery, {
+ transactionId: r1.transactionId,
});
+ await wallet.runUntilDone();
console.log(wr);
const txs = await wallet.client.call(
WalletApiOperation.GetTransactions,
@@ -135,9 +136,10 @@ export async function runRefundIncrementalTest(t: GlobalTestState) {
console.log("third refund increase response", ref);
{
- let wr = await wallet.client.call(WalletApiOperation.AcceptPurchaseRefund, {
- transactionId: ref.talerRefundUri,
+ let wr = await wallet.client.call(WalletApiOperation.StartRefundQuery, {
+ transactionId: r1.transactionId,
});
+ await wallet.runUntilDone();
console.log(wr);
}
@@ -169,7 +171,6 @@ export async function runRefundIncrementalTest(t: GlobalTestState) {
"payment",
"refund",
"refund",
- "refund",
]);
for (const tx of txs.transactions) {
diff --git a/packages/taler-wallet-core/src/operations/transactions.ts b/packages/taler-wallet-core/src/operations/transactions.ts
index d9778f0c2..ac82dc96d 100644
--- a/packages/taler-wallet-core/src/operations/transactions.ts
+++ b/packages/taler-wallet-core/src/operations/transactions.ts
@@ -652,7 +652,7 @@ function buildTransactionForRefund(
return {
type: TransactionType.Refund,
amountEffective: refundRecord.amountEffective,
- amountRaw: refundRecord.amountEffective,
+ amountRaw: refundRecord.amountRaw,
refundedTransactionId: constructTransactionIdentifier({
tag: TransactionType.Payment,
proposalId: refundRecord.proposalId