-test fixes

This commit is contained in:
Florian Dold 2023-05-07 22:16:33 +02:00
parent 7f0edb6a78
commit 99b844b465
No known key found for this signature in database
GPG Key ID: D2E4F00F29D02A4B
3 changed files with 9 additions and 11 deletions

View File

@ -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, {});

View File

@ -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) {

View File

@ -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