commit c69f35188924af63652e9e01bddf2ea44dfa3a84
parent 49e26844493c3bb97d6fd7a72d949e0b9dc624f7
Author: Florian Dold <florian@dold.me>
Date: Wed, 11 Dec 2024 13:50:55 +0100
Normalize payto
Diffstat:
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
@@ -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,