aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src
diff options
context:
space:
mode:
Diffstat (limited to 'packages/taler-wallet-core/src')
-rw-r--r--packages/taler-wallet-core/src/wallet.ts16
-rw-r--r--packages/taler-wallet-core/src/withdraw.ts6
2 files changed, 12 insertions, 10 deletions
diff --git a/packages/taler-wallet-core/src/wallet.ts b/packages/taler-wallet-core/src/wallet.ts
index 8671db0da..4bff23fd5 100644
--- a/packages/taler-wallet-core/src/wallet.ts
+++ b/packages/taler-wallet-core/src/wallet.ts
@@ -551,9 +551,9 @@ async function dumpCoins(wex: WalletExecutionContext): Promise<CoinDumpJson> {
ageCommitmentProof: c.ageCommitmentProof,
spend_allocation: c.spendAllocation
? {
- amount: c.spendAllocation.amount,
- id: c.spendAllocation.id,
- }
+ amount: c.spendAllocation.amount,
+ id: c.spendAllocation.id,
+ }
: undefined,
});
}
@@ -906,9 +906,7 @@ async function dispatchRequestInternal(
}
case WalletApiOperation.GetWithdrawalDetailsForUri: {
const req = codecForGetWithdrawalDetailsForUri().decode(payload);
- return await getWithdrawalDetailsForUri(wex, req.talerWithdrawUri, {
- restrictAge: req.restrictAge,
- });
+ return await getWithdrawalDetailsForUri(wex, req.talerWithdrawUri);
}
case WalletApiOperation.TestingGetReserveHistory: {
const req = codecForTestingGetReserveHistoryRequest().decode(payload);
@@ -1654,7 +1652,7 @@ async function handleCoreApiRequest(
wex = getObservedWalletExecutionContext(ws, cts.token, oc);
} else {
oc = {
- observe(evt) {},
+ observe(evt) { },
};
wex = getNormalWalletExecutionContext(ws, cts.token, oc);
}
@@ -1791,7 +1789,7 @@ export class Cache<T> {
constructor(
private maxCapacity: number,
private cacheDuration: Duration,
- ) {}
+ ) { }
get(key: string): T | undefined {
const r = this.map.get(key);
@@ -1827,7 +1825,7 @@ export class Cache<T> {
* Implementation of triggers for the wallet DB.
*/
class WalletDbTriggerSpec implements TriggerSpec {
- constructor(public ws: InternalWalletState) {}
+ constructor(public ws: InternalWalletState) { }
afterCommit(info: AfterCommitInfo): void {
if (info.mode !== "readwrite") {
diff --git a/packages/taler-wallet-core/src/withdraw.ts b/packages/taler-wallet-core/src/withdraw.ts
index bc19dc1f6..d14689b12 100644
--- a/packages/taler-wallet-core/src/withdraw.ts
+++ b/packages/taler-wallet-core/src/withdraw.ts
@@ -2269,7 +2269,6 @@ export interface GetWithdrawalDetailsForUriOpts {
export async function getWithdrawalDetailsForUri(
wex: WalletExecutionContext,
talerWithdrawUri: string,
- opts: GetWithdrawalDetailsForUriOpts = {},
): Promise<WithdrawUriInfoResponse> {
logger.trace(`getting withdrawal details for URI ${talerWithdrawUri}`);
const info = await getBankWithdrawalInfo(wex.http, talerWithdrawUri);
@@ -2937,11 +2936,13 @@ export async function prepareBankIntegratedWithdrawal(
) {
url = existingWithdrawalGroup.wgInfo.bankInfo.confirmUrl;
}
+ const info = await getWithdrawalDetailsForUri(wex, req.talerWithdrawUri);
return {
transactionId: constructTransactionIdentifier({
tag: TransactionType.Withdrawal,
withdrawalGroupId: existingWithdrawalGroup.withdrawalGroupId,
}),
+ info,
};
}
@@ -2965,6 +2966,8 @@ export async function prepareBankIntegratedWithdrawal(
reserveStatus: WithdrawalGroupStatus.DialogProposed,
});
+ const info = await getWithdrawalDetailsForUri(wex, req.talerWithdrawUri);
+
const withdrawalGroupId = withdrawalGroup.withdrawalGroupId;
const ctx = new WithdrawTransactionContext(wex, withdrawalGroupId);
@@ -2973,6 +2976,7 @@ export async function prepareBankIntegratedWithdrawal(
return {
transactionId: ctx.transactionId,
+ info,
};
}