aboutsummaryrefslogtreecommitdiff
path: root/src/operations/transactions.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2020-07-16 22:52:56 +0530
committerFlorian Dold <florian.dold@gmail.com>2020-07-16 22:52:56 +0530
commit85a095fa7d4d31e1e84e5e096fa28c59f3cd1918 (patch)
treebfad4a87f540c0ae1480fd2ab80911045f7f912e /src/operations/transactions.ts
parentdd3a31f33dc54b475b204e15d8d0a5c5e2a70ee8 (diff)
manual withdrawalv0.7.1-dev.8v0.7.1-dev.7
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({