[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-wallet-core] branch master updated: wallet-core: return currency
From: |
gnunet |
Subject: |
[taler-wallet-core] branch master updated: wallet-core: return currency spec in response also when there is no conversion URL |
Date: |
Wed, 31 Jul 2024 18:02:42 +0200 |
This is an automated email from the git hooks/post-receive script.
ivan-avalos pushed a commit to branch master
in repository wallet-core.
The following commit(s) were added to refs/heads/master by this push:
new a7b347c95 wallet-core: return currency spec in response also when
there is no conversion URL
a7b347c95 is described below
commit a7b347c956727d82c119dd3fa4d7ef8ec27b142e
Author: Iván Ávalos <avalos@disroot.org>
AuthorDate: Wed Jul 31 10:02:07 2024 -0600
wallet-core: return currency spec in response also when there is no
conversion URL
---
packages/taler-wallet-core/src/withdraw.ts | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/packages/taler-wallet-core/src/withdraw.ts
b/packages/taler-wallet-core/src/withdraw.ts
index 1d55fe08c..939070a9e 100644
--- a/packages/taler-wallet-core/src/withdraw.ts
+++ b/packages/taler-wallet-core/src/withdraw.ts
@@ -59,6 +59,7 @@ import {
NotificationType,
ObservabilityEventType,
PrepareBankIntegratedWithdrawalResponse,
+ ScopeInfo,
TalerBankIntegrationHttpClient,
TalerError,
TalerErrorCode,
@@ -135,6 +136,7 @@ import {
PlanchetRecord,
PlanchetStatus,
WalletDbAllStoresReadOnlyTransaction,
+ WalletDbHelpers,
WalletDbReadOnlyTransaction,
WalletDbReadWriteTransaction,
WalletDbStoresArr,
@@ -3536,6 +3538,7 @@ async function waitWithdrawalRegistered(
async function fetchAccount(
wex: WalletExecutionContext,
instructedAmount: AmountJson,
+ scopeInfo: ScopeInfo,
acct: ExchangeWireAccount,
reservePub: string | undefined,
cancellationToken: CancellationToken,
@@ -3586,6 +3589,20 @@ async function fetchAccount(
} else {
paytoUri = acct.payto_uri;
transferAmount = Amounts.stringify(instructedAmount);
+
+ // fetch currency specification from DB
+ const resp = await wex.db.runReadOnlyTx(
+ {
+ storeNames: ["currencyInfo"],
+ },
+ async (tx) => {
+ return WalletDbHelpers.getCurrencyInfo(tx, scopeInfo);
+ },
+ );
+
+ if (resp) {
+ currencySpecification = resp.currencySpec;
+ }
}
paytoUri = addPaytoQueryParams(paytoUri, {
amount: Amounts.stringify(transferAmount),
@@ -3630,6 +3647,7 @@ async function fetchWithdrawalAccountInfo(
const acctInfo = await fetchAccount(
wex,
req.instructedAmount,
+ req.exchange.scopeInfo,
acct,
req.reservePub,
cancellationToken,
--
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: return currency spec in response also when there is no conversion URL,
gnunet <=