[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-wallet-core] branch master updated: fix payto
From: |
gnunet |
Subject: |
[taler-wallet-core] branch master updated: fix payto |
Date: |
Mon, 23 Jan 2023 12:15:29 +0100 |
This is an automated email from the git hooks/post-receive script.
sebasjm pushed a commit to branch master
in repository wallet-core.
The following commit(s) were added to refs/heads/master by this push:
new 509011f9b fix payto
509011f9b is described below
commit 509011f9bca5c0693102b780fa782e910217f1ae
Author: Sebastian <sebasjm@gmail.com>
AuthorDate: Mon Jan 23 08:15:22 2023 -0300
fix payto
---
packages/merchant-backoffice-ui/package.json | 4 ++--
.../paths/instance/reserves/create/CreatedSuccessfully.tsx | 9 ++++++++-
.../src/paths/instance/reserves/details/DetailPage.tsx | 14 ++++++++++++--
3 files changed, 22 insertions(+), 5 deletions(-)
diff --git a/packages/merchant-backoffice-ui/package.json
b/packages/merchant-backoffice-ui/package.json
index cffe73e3f..eb3aa1834 100644
--- a/packages/merchant-backoffice-ui/package.json
+++ b/packages/merchant-backoffice-ui/package.json
@@ -1,8 +1,8 @@
{
"private": true,
"name": "@gnu-taler/merchant-backoffice",
- "version": "0.0.4",
- "license": "MIT",
+ "version": "0.0.5",
+ "license": "AGPL-3.0-or-later",
"type": "module",
"scripts": {
"build": "./build.mjs",
diff --git
a/packages/merchant-backoffice-ui/src/paths/instance/reserves/create/CreatedSuccessfully.tsx
b/packages/merchant-backoffice-ui/src/paths/instance/reserves/create/CreatedSuccessfully.tsx
index 92427f3dc..b82907122 100644
---
a/packages/merchant-backoffice-ui/src/paths/instance/reserves/create/CreatedSuccessfully.tsx
+++
b/packages/merchant-backoffice-ui/src/paths/instance/reserves/create/CreatedSuccessfully.tsx
@@ -14,6 +14,7 @@
GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
*/
+import { parsePaytoUri, stringifyPaytoUri } from "@gnu-taler/taler-util";
import { useTranslationContext } from "@gnu-taler/web-util/lib/index.browser";
import { h, VNode } from "preact";
import { QR } from "../../../../components/exception/QR.js";
@@ -36,7 +37,13 @@ export function CreatedSuccessfully({
onConfirm,
onCreateAnother,
}: Props): VNode {
- const link =
`${entity.response.payto_uri}?message=${entity.response.reserve_pub}&amount=${entity.request.initial_balance}`;
+ const p = parsePaytoUri(entity.response.payto_uri);
+ if (p) {
+ p.params["message"] = entity.response.reserve_pub;
+ p.params["amount"] = entity.request.initial_balance;
+ }
+
+ const link = !p ? entity.response.payto_uri : stringifyPaytoUri(p);
const { i18n } = useTranslationContext();
return (
<Template onConfirm={onConfirm} onCreateAnother={onCreateAnother}>
diff --git
a/packages/merchant-backoffice-ui/src/paths/instance/reserves/details/DetailPage.tsx
b/packages/merchant-backoffice-ui/src/paths/instance/reserves/details/DetailPage.tsx
index 1d54198c8..54e8123e4 100644
---
a/packages/merchant-backoffice-ui/src/paths/instance/reserves/details/DetailPage.tsx
+++
b/packages/merchant-backoffice-ui/src/paths/instance/reserves/details/DetailPage.tsx
@@ -19,7 +19,11 @@
* @author Sebastian Javier Marchano (sebasjm)
*/
-import { Amounts } from "@gnu-taler/taler-util";
+import {
+ Amounts,
+ parsePaytoUri,
+ stringifyPaytoUri,
+} from "@gnu-taler/taler-util";
import { useTranslationContext } from "@gnu-taler/web-util/lib/index.browser";
import { format } from "date-fns";
import { Fragment, h, VNode } from "preact";
@@ -49,7 +53,13 @@ export function DetailPage({ id, selected, onBack }: Props):
VNode {
const didExchangeAckTransfer = Amounts.isNonZero(
Amounts.parseOrThrow(selected.exchange_initial_amount),
);
- const link =
`${selected.payto_uri}?message=${id}&amount=${selected.merchant_initial_amount}`;
+ const p = parsePaytoUri(selected.payto_uri);
+ if (p) {
+ p.params["message"] = id;
+ p.params["amount"] = selected.merchant_initial_amount;
+ }
+
+ const link = !p ? selected.payto_uri : stringifyPaytoUri(p);
return (
<div class="columns">
--
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: fix payto,
gnunet <=