summaryrefslogtreecommitdiff
path: root/src/operations/transactions.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/operations/transactions.ts')
-rw-r--r--src/operations/transactions.ts19
1 files changed, 2 insertions, 17 deletions
diff --git a/src/operations/transactions.ts b/src/operations/transactions.ts
index bcf7a9e68..bdb68a3bb 100644
--- a/src/operations/transactions.ts
+++ b/src/operations/transactions.ts
@@ -35,9 +35,7 @@ import {
WithdrawalType,
WithdrawalDetails,
} from "../types/transactions";
-import { WithdrawalDetailsResponse } from "../types/walletTypes";
-import { Logger } from "../util/logging";
-import { addPaytoQueryParams } from "../util/payto";
+import { getFundingPaytoUris } from "./reserves";
/**
* Create an event ID from the type and the primary key for the event.
@@ -257,22 +255,9 @@ export async function getTransactions(
bankConfirmationUrl: r.bankInfo.confirmUrl,
}
} else {
- const exchange = await tx.get(Stores.exchanges, r.exchangeBaseUrl);
- if (!exchange) {
- // FIXME: report somehow
- return;
- }
- const plainPaytoUris = exchange.wireInfo?.accounts.map((x) => x.payto_uri) ?? [];
- if (!plainPaytoUris) {
- // FIXME: report somehow
- return;
- }
withdrawalDetails = {
type: WithdrawalType.ManualTransfer,
- exchangePaytoUris: plainPaytoUris.map((x) => addPaytoQueryParams(x, {
- amount: Amounts.stringify(r.instructedAmount),
- message: `Taler Withdrawal ${r.reservePub}`,
- })),
+ exchangePaytoUris: await getFundingPaytoUris(tx, r.reservePub),
};
}
transactions.push({