gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-wallet-core] 01/02: Normalize payto


From: gnunet
Subject: [taler-wallet-core] 01/02: Normalize payto
Date: Wed, 11 Dec 2024 13:51:24 +0100

This is an automated email from the git hooks/post-receive script.

dold pushed a commit to branch master
in repository wallet-core.

commit c69f35188924af63652e9e01bddf2ea44dfa3a84
Author: Florian Dold <florian@dold.me>
AuthorDate: Wed Dec 11 13:50:55 2024 +0100

    Normalize payto
---
 packages/taler-wallet-core/src/deposits.ts | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/packages/taler-wallet-core/src/deposits.ts 
b/packages/taler-wallet-core/src/deposits.ts
index cf74400a5..0df0797d6 100644
--- a/packages/taler-wallet-core/src/deposits.ts
+++ b/packages/taler-wallet-core/src/deposits.ts
@@ -69,11 +69,10 @@ import {
   codecForTackTransactionWired,
   encodeCrock,
   getRandomBytes,
-  hashTruncate32,
+  hashNormalizedPaytoUri,
   hashWire,
   j2s,
   parsePaytoUri,
-  stringToBytes,
 } from "@gnu-taler/taler-util";
 import {
   readResponseJsonOrThrow,
@@ -262,6 +261,7 @@ export class DepositTransactionContext implements 
TransactionContext {
         tag: TransactionType.Deposit,
         depositGroupId: dg.depositGroupId,
       }),
+      accountPub: dg.merchantPub,
       wireTransferProgress,
       depositGroupId: dg.depositGroupId,
       trackingState,
@@ -1322,8 +1322,10 @@ async function processDepositGroupPendingTrack(
       logger.trace(`track response: ${j2s(track)}`);
       if (track.type === "accepted") {
         if (!track.kyc_ok && track.requirement_row !== undefined) {
+          // FIXME: Take this from the response. If not present, require KYC 
transfer.
+          // But: Why did exchange accept deposit in the first place if 
missing?
           const paytoHash = encodeCrock(
-            hashTruncate32(stringToBytes(depositGroup.wire.payto_uri + "\0")),
+            hashNormalizedPaytoUri(depositGroup.wire.payto_uri),
           );
           return transitionToKycRequired(
             wex,

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]