From 629cb08490adf1be26a811d743d8152de48a3c2a Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Tue, 28 Nov 2023 11:41:56 +0100 Subject: -more consistent naming --- .../src/integrationtests/test-withdrawal-conversion.ts | 4 ++-- packages/taler-util/src/transactions-types.ts | 4 ++-- packages/taler-util/src/wallet-types.ts | 8 ++++---- packages/taler-wallet-core/src/db.ts | 4 ++-- packages/taler-wallet-core/src/operations/transactions.ts | 2 +- packages/taler-wallet-core/src/operations/withdraw.ts | 10 +++++----- packages/taler-wallet-core/src/wallet.ts | 2 +- 7 files changed, 17 insertions(+), 17 deletions(-) diff --git a/packages/taler-harness/src/integrationtests/test-withdrawal-conversion.ts b/packages/taler-harness/src/integrationtests/test-withdrawal-conversion.ts index 6fc403be4..08ae38bf2 100644 --- a/packages/taler-harness/src/integrationtests/test-withdrawal-conversion.ts +++ b/packages/taler-harness/src/integrationtests/test-withdrawal-conversion.ts @@ -234,9 +234,9 @@ export async function runWithdrawalConversionTest(t: GlobalTestState) { txInfo.withdrawalDetails.type, WithdrawalType.ManualTransfer, ); - t.assertTrue(!!txInfo.withdrawalDetails.exchangeCreditAccounts); + t.assertTrue(!!txInfo.withdrawalDetails.exchangeCreditAccountDetails); t.assertDeepEqual( - txInfo.withdrawalDetails.exchangeCreditAccounts[0].transferAmount, + txInfo.withdrawalDetails.exchangeCreditAccountDetails[0].transferAmount, "FOO:123", ); diff --git a/packages/taler-util/src/transactions-types.ts b/packages/taler-util/src/transactions-types.ts index f2bf49b00..bce1e6b39 100644 --- a/packages/taler-util/src/transactions-types.ts +++ b/packages/taler-util/src/transactions-types.ts @@ -51,7 +51,7 @@ import { TalerErrorDetail, TransactionIdStr, TransactionStateFilter, - WithdrawalAccountInfo, + WithdrawalExchangeAccountDetails, } from "./wallet-types.js"; export interface TransactionsRequest { @@ -243,7 +243,7 @@ interface WithdrawalDetailsForManualTransfer { */ exchangePaytoUris: string[]; - exchangeCreditAccounts?: WithdrawalAccountInfo[]; + exchangeCreditAccountDetails?: WithdrawalExchangeAccountDetails[]; // Public key of the reserve reservePub: string; diff --git a/packages/taler-util/src/wallet-types.ts b/packages/taler-util/src/wallet-types.ts index d4d6119fb..022f42f13 100644 --- a/packages/taler-util/src/wallet-types.ts +++ b/packages/taler-util/src/wallet-types.ts @@ -1403,7 +1403,7 @@ export interface AcceptManualWithdrawalResult { */ reservePub: string; - withdrawalAccountsList: WithdrawalAccountInfo[]; + withdrawalAccountsList: WithdrawalExchangeAccountDetails[]; transactionId: TransactionIdStr; } @@ -1442,7 +1442,7 @@ export interface ManualWithdrawalDetails { /** * Ways to pay the exchange, including accounts that require currency conversion. */ - withdrawalAccountList: WithdrawalAccountInfo[]; + withdrawalAccountList: WithdrawalExchangeAccountDetails[]; /** * If the exchange supports age-restricted coins it will return @@ -1476,7 +1476,7 @@ export interface ExchangeWithdrawalDetails { */ exchangeWireAccounts: string[]; - withdrawalAccountList: WithdrawalAccountInfo[]; + exchangeCreditAccountDetails: WithdrawalExchangeAccountDetails[]; /** * Selected denominations for withdraw. @@ -2764,7 +2764,7 @@ export interface TestingWaitTransactionRequest { txState: TransactionState; } -export interface WithdrawalAccountInfo { +export interface WithdrawalExchangeAccountDetails { /** * Payto URI to credit the exchange. * diff --git a/packages/taler-wallet-core/src/db.ts b/packages/taler-wallet-core/src/db.ts index 279b75bf5..0af04f80f 100644 --- a/packages/taler-wallet-core/src/db.ts +++ b/packages/taler-wallet-core/src/db.ts @@ -56,7 +56,7 @@ import { TransactionIdStr, UnblindedSignature, WireInfo, - WithdrawalAccountInfo, + WithdrawalExchangeAccountDetails, codecForAny, } from "@gnu-taler/taler-util"; import { DbRetryInfo, TaskIdentifiers } from "./operations/common.js"; @@ -1386,7 +1386,7 @@ export interface WgInfoBankManual { /** * Info about withdrawal accounts, possibly including currency conversion. */ - exchangeCreditAccounts?: WithdrawalAccountInfo[]; + exchangeCreditAccounts?: WithdrawalExchangeAccountDetails[]; } export interface WgInfoBankPeerPull { diff --git a/packages/taler-wallet-core/src/operations/transactions.ts b/packages/taler-wallet-core/src/operations/transactions.ts index b294c163e..0ff552916 100644 --- a/packages/taler-wallet-core/src/operations/transactions.ts +++ b/packages/taler-wallet-core/src/operations/transactions.ts @@ -720,7 +720,7 @@ function buildTransactionForManualWithdraw( type: WithdrawalType.ManualTransfer, reservePub: withdrawalGroup.reservePub, exchangePaytoUris, - exchangeCreditAccounts: withdrawalGroup.wgInfo.exchangeCreditAccounts, + exchangeCreditAccountDetails: withdrawalGroup.wgInfo.exchangeCreditAccounts, reserveIsReady: withdrawalGroup.status === WithdrawalGroupStatus.Done || withdrawalGroup.status === WithdrawalGroupStatus.PendingReady, diff --git a/packages/taler-wallet-core/src/operations/withdraw.ts b/packages/taler-wallet-core/src/operations/withdraw.ts index 9dd0f0a3f..c7a44bf0f 100644 --- a/packages/taler-wallet-core/src/operations/withdraw.ts +++ b/packages/taler-wallet-core/src/operations/withdraw.ts @@ -56,7 +56,7 @@ import { URL, UnblindedSignature, WithdrawUriInfoResponse, - WithdrawalAccountInfo, + WithdrawalExchangeAccountDetails, addPaytoQueryParams, canonicalizeBaseUrl, codecForBankWithdrawalOperationPostResponse, @@ -1873,7 +1873,7 @@ export async function getExchangeWithdrawalInfo( earliestDepositExpiration, exchangePaytoUris: paytoUris, exchangeWireAccounts, - withdrawalAccountList, + exchangeCreditAccountDetails: withdrawalAccountList, exchangeVersion: exchangeDetails.protocolVersionRange || "unknown", numOfferedDenoms: possibleDenoms.length, selectedDenoms, @@ -2584,9 +2584,9 @@ async function fetchWithdrawalAccountInfo( instructedAmount: AmountJson; reservePub?: string; }, -): Promise { +): Promise { const { exchangeDetails, instructedAmount } = req; - const withdrawalAccounts: WithdrawalAccountInfo[] = []; + const withdrawalAccounts: WithdrawalExchangeAccountDetails[] = []; for (let acct of exchangeDetails.wireInfo.accounts) { let paytoUri: string; let transferAmount: AmountString; @@ -2617,7 +2617,7 @@ async function fetchWithdrawalAccountInfo( message: `Taler Withdrawal ${req.reservePub}`, }); } - const acctInfo: WithdrawalAccountInfo = { + const acctInfo: WithdrawalExchangeAccountDetails = { paytoUri, transferAmount, creditRestrictions: acct.credit_restrictions, diff --git a/packages/taler-wallet-core/src/wallet.ts b/packages/taler-wallet-core/src/wallet.ts index ebdab97d1..6b9e960ce 100644 --- a/packages/taler-wallet-core/src/wallet.ts +++ b/packages/taler-wallet-core/src/wallet.ts @@ -1215,7 +1215,7 @@ async function dispatchRequestInternal( paytoUris: wi.exchangePaytoUris, tosAccepted: wi.termsOfServiceAccepted, ageRestrictionOptions: wi.ageRestrictionOptions, - withdrawalAccountList: wi.withdrawalAccountList, + withdrawalAccountList: wi.exchangeCreditAccountDetails, numCoins, }; return resp; -- cgit v1.2.3