[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-wallet-core] branch master updated: transactions list
From: |
gnunet |
Subject: |
[taler-wallet-core] branch master updated: transactions list |
Date: |
Thu, 16 Jul 2020 17:33:33 +0200 |
This is an automated email from the git hooks/post-receive script.
dold pushed a commit to branch master
in repository wallet-core.
The following commit(s) were added to refs/heads/master by this push:
new dd3a31f3 transactions list
dd3a31f3 is described below
commit dd3a31f33dc54b475b204e15d8d0a5c5e2a70ee8
Author: Florian Dold <florian.dold@gmail.com>
AuthorDate: Thu Jul 16 21:03:22 2020 +0530
transactions list
---
src/operations/transactions.ts | 14 +++++++++++---
src/types/transactions.ts | 8 ++------
2 files changed, 13 insertions(+), 9 deletions(-)
diff --git a/src/operations/transactions.ts b/src/operations/transactions.ts
index f2845cb1..bcf7a9e6 100644
--- a/src/operations/transactions.ts
+++ b/src/operations/transactions.ts
@@ -36,6 +36,8 @@ import {
WithdrawalDetails,
} from "../types/transactions";
import { WithdrawalDetailsResponse } from "../types/walletTypes";
+import { Logger } from "../util/logging";
+import { addPaytoQueryParams } from "../util/payto";
/**
* Create an event ID from the type and the primary key for the event.
@@ -202,7 +204,6 @@ export async function getTransactions(
}
withdrawalDetails = {
type: WithdrawalType.ManualTransfer,
- reservePublicKey: r.reservePub,
exchangePaytoUris: exchange.wireInfo?.accounts.map((x) =>
x.payto_uri) ?? [],
};
}
@@ -261,10 +262,17 @@ export async function getTransactions(
// FIXME: report somehow
return;
}
+ const plainPaytoUris = exchange.wireInfo?.accounts.map((x) =>
x.payto_uri) ?? [];
+ if (!plainPaytoUris) {
+ // FIXME: report somehow
+ return;
+ }
withdrawalDetails = {
type: WithdrawalType.ManualTransfer,
- reservePublicKey: r.reservePub,
- exchangePaytoUris: exchange.wireInfo?.accounts.map((x) =>
x.payto_uri) ?? [],
+ exchangePaytoUris: plainPaytoUris.map((x) =>
addPaytoQueryParams(x, {
+ amount: Amounts.stringify(r.instructedAmount),
+ message: `Taler Withdrawal ${r.reservePub}`,
+ })),
};
}
transactions.push({
diff --git a/src/types/transactions.ts b/src/types/transactions.ts
index aa618cd4..b87726ba 100644
--- a/src/types/transactions.ts
+++ b/src/types/transactions.ts
@@ -117,14 +117,10 @@ export type WithdrawalDetails =
interface WithdrawalDetailsForManualTransfer {
type: WithdrawalType.ManualTransfer;
- /**
- * Public key of the reserve that needs to be funded
- * manually.
- */
- reservePublicKey: string;
-
/**
* Payto URIs that the exchange supports.
+ *
+ * Already contains the amount and message.
*/
exchangePaytoUris: string[];
}
--
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: transactions list,
gnunet <=