From a6fd7de9d9c16e290a9c0d1cd81c5debdb2d2bc0 Mon Sep 17 00:00:00 2001 From: Marc Stibane Date: Sat, 2 Dec 2023 10:52:34 +0100 Subject: withdrawalAccountsList with plural-s --- .../src/integrationtests/test-withdrawal-conversion.ts | 2 +- packages/taler-util/src/wallet-types.ts | 4 ++-- packages/taler-wallet-core/src/operations/withdraw.ts | 10 +++++----- packages/taler-wallet-core/src/wallet.ts | 2 +- packages/taler-wallet-webextension/src/cta/Withdraw/state.ts | 2 +- packages/taler-wallet-webextension/src/cta/Withdraw/test.ts | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/packages/taler-harness/src/integrationtests/test-withdrawal-conversion.ts b/packages/taler-harness/src/integrationtests/test-withdrawal-conversion.ts index fae91be52..781a0fe90 100644 --- a/packages/taler-harness/src/integrationtests/test-withdrawal-conversion.ts +++ b/packages/taler-harness/src/integrationtests/test-withdrawal-conversion.ts @@ -196,7 +196,7 @@ export async function runWithdrawalConversionTest(t: GlobalTestState) { console.log(`withdrawal details: ${j2s(infoRes)}`); - const checkTransferAmount = infoRes.withdrawalAccountList[0].transferAmount; + const checkTransferAmount = infoRes.withdrawalAccountsList[0].transferAmount; t.assertTrue(checkTransferAmount != null); t.assertAmountEquals(checkTransferAmount, "FOO:123"); diff --git a/packages/taler-util/src/wallet-types.ts b/packages/taler-util/src/wallet-types.ts index b7ebae1c1..8e72a4949 100644 --- a/packages/taler-util/src/wallet-types.ts +++ b/packages/taler-util/src/wallet-types.ts @@ -1438,14 +1438,14 @@ export interface ManualWithdrawalDetails { /** * Ways to pay the exchange. * - * @deprecated in favor of withdrawalAccountList + * @deprecated in favor of withdrawalAccountsList */ paytoUris: string[]; /** * Ways to pay the exchange, including accounts that require currency conversion. */ - withdrawalAccountList: WithdrawalExchangeAccountDetails[]; + withdrawalAccountsList: WithdrawalExchangeAccountDetails[]; /** * If the exchange supports age-restricted coins it will return diff --git a/packages/taler-wallet-core/src/operations/withdraw.ts b/packages/taler-wallet-core/src/operations/withdraw.ts index 24e8d3f8f..4a1fdbfae 100644 --- a/packages/taler-wallet-core/src/operations/withdraw.ts +++ b/packages/taler-wallet-core/src/operations/withdraw.ts @@ -1764,7 +1764,7 @@ export async function getExchangeWithdrawalInfo( ); } - const withdrawalAccountList = await fetchWithdrawalAccountInfo(ws, { + const withdrawalAccountsList = await fetchWithdrawalAccountInfo(ws, { exchangeDetails, instructedAmount, }); @@ -1874,7 +1874,7 @@ export async function getExchangeWithdrawalInfo( earliestDepositExpiration, exchangePaytoUris: paytoUris, exchangeWireAccounts, - exchangeCreditAccountDetails: withdrawalAccountList, + exchangeCreditAccountDetails: withdrawalAccountsList, exchangeVersion: exchangeDetails.protocolVersionRange || "unknown", numOfferedDenoms: possibleDenoms.length, selectedDenoms, @@ -2684,7 +2684,7 @@ export async function createManualWithdrawal( {}, ); - const withdrawalAccountList = await fetchWithdrawalAccountInfo(ws, { + const withdrawalAccountsList = await fetchWithdrawalAccountInfo(ws, { exchangeDetails, instructedAmount: amount, reservePub: reserveKeyPair.pub, @@ -2694,7 +2694,7 @@ export async function createManualWithdrawal( amount: Amounts.jsonifyAmount(req.amount), wgInfo: { withdrawalType: WithdrawalRecordType.BankManual, - exchangeCreditAccounts: withdrawalAccountList, + exchangeCreditAccounts: withdrawalAccountsList, }, exchangeBaseUrl: req.exchangeBaseUrl, forcedDenomSel: req.forcedDenomSel, @@ -2720,7 +2720,7 @@ export async function createManualWithdrawal( return { reservePub: withdrawalGroup.reservePub, exchangePaytoUris: exchangePaytoUris, - withdrawalAccountsList: withdrawalAccountList, + withdrawalAccountsList: withdrawalAccountsList, transactionId, }; } diff --git a/packages/taler-wallet-core/src/wallet.ts b/packages/taler-wallet-core/src/wallet.ts index 507d72cce..bccdf721f 100644 --- a/packages/taler-wallet-core/src/wallet.ts +++ b/packages/taler-wallet-core/src/wallet.ts @@ -1217,7 +1217,7 @@ async function dispatchRequestInternal( paytoUris: wi.exchangePaytoUris, tosAccepted: wi.termsOfServiceAccepted, ageRestrictionOptions: wi.ageRestrictionOptions, - withdrawalAccountList: wi.exchangeCreditAccountDetails, + withdrawalAccountsList: wi.exchangeCreditAccountDetails, numCoins, // FIXME: Once we have proper scope info support, return correct info here. scopeInfo: { diff --git a/packages/taler-wallet-webextension/src/cta/Withdraw/state.ts b/packages/taler-wallet-webextension/src/cta/Withdraw/state.ts index c10572d1a..f30cb2323 100644 --- a/packages/taler-wallet-webextension/src/cta/Withdraw/state.ts +++ b/packages/taler-wallet-webextension/src/cta/Withdraw/state.ts @@ -329,7 +329,7 @@ function exchangeSelectionState( return { amount: withdrawAmount, ageRestrictionOptions: info.ageRestrictionOptions, - accounts: info.withdrawalAccountList + accounts: info.withdrawalAccountsList }; }, []); diff --git a/packages/taler-wallet-webextension/src/cta/Withdraw/test.ts b/packages/taler-wallet-webextension/src/cta/Withdraw/test.ts index 5b5530f1c..b6c9acfb5 100644 --- a/packages/taler-wallet-webextension/src/cta/Withdraw/test.ts +++ b/packages/taler-wallet-webextension/src/cta/Withdraw/test.ts @@ -165,7 +165,7 @@ describe("Withdraw CTA states", () => { type: ScopeType.Exchange, url: "http://asd" }, - withdrawalAccountList: [], + withdrawalAccountsList: [], ageRestrictionOptions: [], numCoins: 42, }, @@ -235,7 +235,7 @@ describe("Withdraw CTA states", () => { url: "http://asd" }, tosAccepted: false, - withdrawalAccountList: [], + withdrawalAccountsList: [], ageRestrictionOptions: [], numCoins: 42, }, -- cgit v1.2.3