diff options
author | Sebastian <sebasjm@gmail.com> | 2021-12-23 15:17:36 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2021-12-23 15:17:36 -0300 |
commit | 2e71117f59e0ae6106930e705ae6a54a9839281b (patch) | |
tree | a39856486a2801f56c65de245c871ce596f8ab16 /packages/taler-wallet-webextension/src/wxApi.ts | |
parent | b8200de6f6c5ab9be3ff9f556c8acda013e574c3 (diff) | |
download | wallet-core-2e71117f59e0ae6106930e705ae6a54a9839281b.tar.xz |
deposit from wallet webex: wip
Diffstat (limited to 'packages/taler-wallet-webextension/src/wxApi.ts')
-rw-r--r-- | packages/taler-wallet-webextension/src/wxApi.ts | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/packages/taler-wallet-webextension/src/wxApi.ts b/packages/taler-wallet-webextension/src/wxApi.ts index 4d8b932d3..64a506c13 100644 --- a/packages/taler-wallet-webextension/src/wxApi.ts +++ b/packages/taler-wallet-webextension/src/wxApi.ts @@ -24,10 +24,11 @@ import { AcceptExchangeTosRequest, AcceptManualWithdrawalResult, AcceptTipRequest, AcceptWithdrawalResponse, - AddExchangeRequest, ApplyRefundResponse, BalancesResponse, ConfirmPayResult, - CoreApiResponse, DeleteTransactionRequest, ExchangesListRespose, + AddExchangeRequest, AmountJson, AmountString, ApplyRefundResponse, BalancesResponse, ConfirmPayResult, + CoreApiResponse, CreateDepositGroupRequest, CreateDepositGroupResponse, DeleteTransactionRequest, ExchangesListRespose, GetExchangeTosResult, GetExchangeWithdrawalInfo, - GetWithdrawalDetailsForUriRequest, NotificationType, PreparePayResult, PrepareTipRequest, + GetFeeForDepositRequest, + GetWithdrawalDetailsForUriRequest, KnownBankAccounts, NotificationType, PreparePayResult, PrepareTipRequest, PrepareTipResult, RetryTransactionRequest, SetWalletDeviceIdRequest, TransactionsResponse, WalletDiagnostics, WithdrawUriInfoResponse } from "@gnu-taler/taler-util"; @@ -36,6 +37,7 @@ import { PendingOperationsResponse, RemoveBackupProviderRequest } from "@gnu-taler/taler-wallet-core"; +import { DepositFee } from "@gnu-taler/taler-wallet-core/src/operations/deposits"; import { ExchangeWithdrawDetails } from "@gnu-taler/taler-wallet-core/src/operations/withdraw"; import { MessageFromBackend } from "./wxBackend.js"; @@ -119,6 +121,18 @@ export function resetDb(): Promise<void> { return callBackend("reset-db", {}); } +export function getFeeForDeposit(depositPaytoUri: string, amount: AmountString): Promise<DepositFee> { + return callBackend("getFeeForDeposit", { + depositPaytoUri, amount + } as GetFeeForDepositRequest); +} + +export function createDepositGroup(depositPaytoUri: string, amount: AmountString): Promise<CreateDepositGroupResponse> { + return callBackend("createDepositGroup", { + depositPaytoUri, amount + } as CreateDepositGroupRequest); +} + /** * Get balances for all currencies/exchanges. */ @@ -170,6 +184,9 @@ export function listKnownCurrencies(): Promise<ListOfKnownCurrencies> { export function listExchanges(): Promise<ExchangesListRespose> { return callBackend("listExchanges", {}); } +export function listKnownBankAccounts(currency?: string): Promise<KnownBankAccounts> { + return callBackend("listKnownBankAccounts", { currency }); +} /** * Get information about the current state of wallet backups. |