[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-wallet-core] branch master updated: wallet-core: consistently cal
From: |
gnunet |
Subject: |
[taler-wallet-core] branch master updated: wallet-core: consistently call it (wallet) bank account |
Date: |
Mon, 09 Dec 2024 18:04:14 +0100 |
This is an automated email from the git hooks/post-receive script.
dold pushed a commit to branch master
in repository wallet-core.
The following commit(s) were added to refs/heads/master by this push:
new 3b318663b wallet-core: consistently call it (wallet) bank account
3b318663b is described below
commit 3b318663bd9e729a18cdf18ac10244f02bd42df2
Author: Florian Dold <florian@dold.me>
AuthorDate: Mon Dec 9 18:04:10 2024 +0100
wallet-core: consistently call it (wallet) bank account
---
packages/taler-util/src/types-taler-wallet.ts | 18 ++++++------
packages/taler-wallet-core/src/wallet.ts | 32 +++++++++++-----------
.../src/wallet/DepositPage/state.ts | 8 +++---
.../src/wallet/DestinationSelection/index.ts | 4 +--
.../src/wallet/DestinationSelection/state.ts | 4 +--
.../src/wallet/DestinationSelection/views.tsx | 4 +--
.../src/wallet/ManageAccount/index.ts | 6 ++--
7 files changed, 38 insertions(+), 38 deletions(-)
diff --git a/packages/taler-util/src/types-taler-wallet.ts
b/packages/taler-util/src/types-taler-wallet.ts
index 520141dc9..26a8113c0 100644
--- a/packages/taler-util/src/types-taler-wallet.ts
+++ b/packages/taler-util/src/types-taler-wallet.ts
@@ -1146,7 +1146,7 @@ export interface WalletCoreVersion {
devMode: boolean;
}
-export interface KnownBankAccountInfo {
+export interface WalletBankAccountInfo {
bankAccountId: string;
paytoUri: string;
@@ -1165,10 +1165,10 @@ export interface KnownBankAccountInfo {
}
export interface ListBankAccountsResponse {
- accounts: KnownBankAccountInfo[];
+ accounts: WalletBankAccountInfo[];
}
-export type GetBankAccountByIdResponse = KnownBankAccountInfo;
+export type GetBankAccountByIdResponse = WalletBankAccountInfo;
export interface GetBankAccountByIdRequest {
bankAccountId: string;
@@ -2030,11 +2030,11 @@ export interface ListBankAccountsRequest {
currency?: string;
}
-export const codecForListKnownBankAccounts =
+export const codecForListBankAccounts =
(): Codec<ListBankAccountsRequest> =>
buildCodecForObject<ListBankAccountsRequest>()
.property("currency", codecOptional(codecForString()))
- .build("ListKnownBankAccountsRequest");
+ .build("ListBankAccountsRequest");
export interface AddBankAccountRequest {
/**
@@ -2065,23 +2065,23 @@ export interface AddBankAccountResponse {
bankAccountId: string;
}
-export const codecForAddKnownBankAccounts = (): Codec<AddBankAccountRequest> =>
+export const codecForAddBankAccountRequest = (): Codec<AddBankAccountRequest>
=>
buildCodecForObject<AddBankAccountRequest>()
.property("replaceBankAccountId", codecOptional(codecForString()))
.property("paytoUri", codecForString())
.property("label", codecForString())
.property("currencies", codecOptional(codecForList(codecForString())))
- .build("AddKnownBankAccountsRequest");
+ .build("AddBankAccountRequest");
export interface ForgetBankAccountRequest {
bankAccountId: string;
}
-export const codecForForgetKnownBankAccounts =
+export const codecForForgetBankAccount =
(): Codec<ForgetBankAccountRequest> =>
buildCodecForObject<ForgetBankAccountRequest>()
.property("bankAccountId", codecForString())
- .build("ForgetKnownBankAccountsRequest");
+ .build("ForgetBankAccountsRequest");
export interface GetContractTermsDetailsRequest {
transactionId: string;
diff --git a/packages/taler-wallet-core/src/wallet.ts
b/packages/taler-wallet-core/src/wallet.ts
index 6dfbabf33..093d846a3 100644
--- a/packages/taler-wallet-core/src/wallet.ts
+++ b/packages/taler-wallet-core/src/wallet.ts
@@ -81,7 +81,6 @@ import {
InitResponse,
IntegrationTestArgs,
IntegrationTestV2Args,
- KnownBankAccountInfo,
ListBankAccountsRequest,
ListBankAccountsResponse,
ListGlobalCurrencyAuditorsResponse,
@@ -120,6 +119,7 @@ import {
UpdateExchangeEntryRequest,
ValidateIbanRequest,
ValidateIbanResponse,
+ WalletBankAccountInfo,
WalletContractData,
WalletCoreVersion,
WalletNotification,
@@ -133,10 +133,10 @@ import {
codecForAcceptExchangeTosRequest,
codecForAcceptManualWithdrawalRequest,
codecForAcceptPeerPullPaymentRequest,
+ codecForAddBankAccountRequest,
codecForAddExchangeRequest,
codecForAddGlobalCurrencyAuditorRequest,
codecForAddGlobalCurrencyExchangeRequest,
- codecForAddKnownBankAccounts,
codecForAny,
codecForApplyDevExperiment,
codecForCanonicalizeBaseUrlRequest,
@@ -156,7 +156,7 @@ import {
codecForExportDbToFileRequest,
codecForFailTransactionRequest,
codecForForceRefreshRequest,
- codecForForgetKnownBankAccounts,
+ codecForForgetBankAccount,
codecForGetBalanceDetailRequest,
codecForGetBankAccountByIdRequest,
codecForGetBankingChoicesForPaytoRequest,
@@ -179,8 +179,8 @@ import {
codecForInitiatePeerPushDebitRequest,
codecForIntegrationTestArgs,
codecForIntegrationTestV2Args,
+ codecForListBankAccounts,
codecForListExchangesRequest,
- codecForListKnownBankAccounts,
codecForPrepareBankIntegratedWithdrawalRequest,
codecForPreparePayRequest,
codecForPreparePayTemplateRequest,
@@ -508,11 +508,11 @@ export async function getDenomInfo(
* List bank accounts known to the wallet from
* previous withdrawals.
*/
-async function handleListKnownBankAccounts(
+async function handleListBankAccounts(
wex: WalletExecutionContext,
req: ListBankAccountsRequest,
): Promise<ListBankAccountsResponse> {
- const accounts: KnownBankAccountInfo[] = [];
+ const accounts: WalletBankAccountInfo[] = [];
const currency = req.currency;
await wex.db.runReadOnlyTx({ storeNames: ["bankAccountsV2"] }, async (tx) =>
{
const knownAccounts = await tx.bankAccountsV2.iter().toArray();
@@ -554,7 +554,7 @@ async function handleGetBankAccountById(
/**
* Remove a known bank account.
*/
-async function forgetKnownBankAccounts(
+async function forgetBankAccount(
wex: WalletExecutionContext,
bankAccountId: string,
): Promise<void> {
@@ -973,7 +973,7 @@ async function handleTestingGetDenomStats(
return denomStats;
}
-async function handleAddKnownBankAccount(
+async function handleAddBankAccount(
wex: WalletExecutionContext,
req: AddBankAccountRequest,
): Promise<AddBankAccountResponse> {
@@ -1018,11 +1018,11 @@ async function handleAddKnownBankAccount(
};
}
-async function handleForgetKnownBankAccounts(
+async function handleForgetBankAccount(
wex: WalletExecutionContext,
req: ForgetBankAccountRequest,
): Promise<EmptyObject> {
- await forgetKnownBankAccounts(wex, req.bankAccountId);
+ await forgetBankAccount(wex, req.bankAccountId);
return {};
}
@@ -1733,20 +1733,20 @@ const handlers: { [T in WalletApiOperation]:
HandlerWithValidator<T> } = {
handler: (wex, req) => getExchangeDetailedInfo(wex, req.exchangeBaseUrl),
},
[WalletApiOperation.ListBankAccounts]: {
- codec: codecForListKnownBankAccounts(),
- handler: handleListKnownBankAccounts,
+ codec: codecForListBankAccounts(),
+ handler: handleListBankAccounts,
},
[WalletApiOperation.GetBankAccountById]: {
codec: codecForGetBankAccountByIdRequest(),
handler: handleGetBankAccountById,
},
[WalletApiOperation.AddBankAccount]: {
- codec: codecForAddKnownBankAccounts(),
- handler: handleAddKnownBankAccount,
+ codec: codecForAddBankAccountRequest(),
+ handler: handleAddBankAccount,
},
[WalletApiOperation.ForgetBankAccount]: {
- codec: codecForForgetKnownBankAccounts(),
- handler: handleForgetKnownBankAccounts,
+ codec: codecForForgetBankAccount(),
+ handler: handleForgetBankAccount,
},
[WalletApiOperation.GetWithdrawalDetailsForUri]: {
codec: codecForGetWithdrawalDetailsForUri(),
diff --git a/packages/taler-wallet-webextension/src/wallet/DepositPage/state.ts
b/packages/taler-wallet-webextension/src/wallet/DepositPage/state.ts
index 2cce0c0af..9ed274c66 100644
--- a/packages/taler-wallet-webextension/src/wallet/DepositPage/state.ts
+++ b/packages/taler-wallet-webextension/src/wallet/DepositPage/state.ts
@@ -16,8 +16,8 @@
import {
Amounts,
- KnownBankAccountInfo,
TransactionAmountMode,
+ WalletBankAccountInfo,
} from "@gnu-taler/taler-util";
import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
import { useTranslationContext } from "@gnu-taler/web-util/browser";
@@ -265,11 +265,11 @@ export function labelForAccountType(id: string): string {
}
export function createLabelsForBankAccount(
- knownBankAccounts: Array<KnownBankAccountInfo>,
+ bankAccounts: Array<WalletBankAccountInfo>,
): { [value: string]: string } {
const initialList: Record<string, string> = {};
- if (!knownBankAccounts.length) return initialList;
- return knownBankAccounts.reduce((prev, cur) => {
+ if (!bankAccounts.length) return initialList;
+ return bankAccounts.reduce((prev, cur) => {
prev[cur.paytoUri] = cur.label ?? "??";
return prev;
}, initialList);
diff --git
a/packages/taler-wallet-webextension/src/wallet/DestinationSelection/index.ts
b/packages/taler-wallet-webextension/src/wallet/DestinationSelection/index.ts
index 944c643fe..37cef96a6 100644
---
a/packages/taler-wallet-webextension/src/wallet/DestinationSelection/index.ts
+++
b/packages/taler-wallet-webextension/src/wallet/DestinationSelection/index.ts
@@ -15,7 +15,7 @@
*/
import {
- KnownBankAccountInfo,
+ WalletBankAccountInfo,
PaytoUri,
ScopeInfo,
} from "@gnu-taler/taler-util";
@@ -72,7 +72,7 @@ export namespace State {
error: undefined;
type: Props["type"];
onSelectAccount: (p: string) => void;
- previous: KnownBankAccountInfo[];
+ previous: WalletBankAccountInfo[];
goToBank: ButtonHandler;
goToWallet: ButtonHandler;
}
diff --git
a/packages/taler-wallet-webextension/src/wallet/DestinationSelection/state.ts
b/packages/taler-wallet-webextension/src/wallet/DestinationSelection/state.ts
index f7a75bacd..9736b877b 100644
---
a/packages/taler-wallet-webextension/src/wallet/DestinationSelection/state.ts
+++
b/packages/taler-wallet-webextension/src/wallet/DestinationSelection/state.ts
@@ -16,7 +16,7 @@
import {
ExchangeUpdateStatus,
- KnownBankAccountInfo,
+ WalletBankAccountInfo,
PaytoUri,
ScopeType,
parseScopeInfoShort,
@@ -46,7 +46,7 @@ export function useComponentState(props: Props):
RecursiveState<State> {
return resp
});
- const previous: KnownBankAccountInfo[] = props.type === "send" && hook &&
!hook.hasError ? hook.response.accounts : [];
+ const previous: WalletBankAccountInfo[] = props.type === "send" && hook &&
!hook.hasError ? hook.response.accounts : [];
if (!scope) {
return () => {
diff --git
a/packages/taler-wallet-webextension/src/wallet/DestinationSelection/views.tsx
b/packages/taler-wallet-webextension/src/wallet/DestinationSelection/views.tsx
index fe7e79e0b..1b34ad4e9 100644
---
a/packages/taler-wallet-webextension/src/wallet/DestinationSelection/views.tsx
+++
b/packages/taler-wallet-webextension/src/wallet/DestinationSelection/views.tsx
@@ -15,7 +15,7 @@
*/
import {
- KnownBankAccountInfo,
+ WalletBankAccountInfo,
parsePaytoUri,
stringifyPaytoUri,
} from "@gnu-taler/taler-util";
@@ -355,7 +355,7 @@ function RowExample({
disabled,
onClick,
}: {
- info: KnownBankAccountInfo;
+ info: WalletBankAccountInfo;
disabled?: boolean;
onClick?: () => void;
}): VNode {
diff --git
a/packages/taler-wallet-webextension/src/wallet/ManageAccount/index.ts
b/packages/taler-wallet-webextension/src/wallet/ManageAccount/index.ts
index dffe1bdbe..0d66f25eb 100644
--- a/packages/taler-wallet-webextension/src/wallet/ManageAccount/index.ts
+++ b/packages/taler-wallet-webextension/src/wallet/ManageAccount/index.ts
@@ -14,7 +14,7 @@
GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
*/
-import { KnownBankAccountInfo, ScopeInfo } from "@gnu-taler/taler-util";
+import { WalletBankAccountInfo, ScopeInfo } from "@gnu-taler/taler-util";
import { ErrorAlertView } from "../../components/CurrentAlerts.js";
import { Loading } from "../../components/Loading.js";
import { ErrorAlert } from "../../context/alert.js";
@@ -59,12 +59,12 @@ export namespace State {
onAccountAdded: ButtonHandler;
onCancel: ButtonHandler;
accountByType: AccountByType;
- deleteAccount: (a: KnownBankAccountInfo) => Promise<void>;
+ deleteAccount: (a: WalletBankAccountInfo) => Promise<void>;
}
}
export type AccountByType = {
- [key: string]: KnownBankAccountInfo[];
+ [key: string]: WalletBankAccountInfo[];
};
const viewMapping: StateViewMap<State> = {
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-wallet-core] branch master updated: wallet-core: consistently call it (wallet) bank account,
gnunet <=