taler-typescript-core

Wallet core logic and WebUIs for various components
Log | Files | Refs | Submodules | README | LICENSE

commit 37fb3e6680e9c1a2b93627b11c83add88923e588
parent e4e2d6034f9e9d76f216788dd74c9a5582f115f2
Author: Florian Dold <florian@dold.me>
Date:   Wed, 17 Sep 2025 17:05:00 +0200

wallet-core: add iconId in add-fake-tx dev experiment

Diffstat:
Mpackages/taler-wallet-core/src/dev-experiments.ts | 8++++++++
1 file changed, 8 insertions(+), 0 deletions(-)

diff --git a/packages/taler-wallet-core/src/dev-experiments.ts b/packages/taler-wallet-core/src/dev-experiments.ts @@ -496,6 +496,7 @@ async function addFakeTx( const pursePub = pursePair.pub; const ctx = new PeerPushDebitTransactionContext(wex, pursePub); const summary = parsedUri.query?.get("summary") ?? "Test"; + const iconId = parsedUri.query?.get("iconId") ?? undefined; const amountEffectiveStr = parsedUri.query?.get("amountEffective"); if (!amountEffectiveStr) { throw Error("missing amountEffective option"); @@ -519,6 +520,9 @@ async function addFakeTx( purse_expiration: AbsoluteTime.toProtocolTimestamp(timestamp), summary, }; + if (iconId != null) { + ct.icon_id = iconId; + } const contractTermsHash = ContractTermsUtil.hashContractTerms(ct); const contractPair = await wex.cryptoApi.createEddsaKeypair({}); const mergePair = await wex.cryptoApi.createEddsaKeypair({}); @@ -555,6 +559,7 @@ async function addFakeTx( const peerPushCreditId = encodeCrock(getRandomBytes(32)); const ctx = new PeerPushCreditTransactionContext(wex, peerPushCreditId); const summary = parsedUri.query?.get("summary") ?? "Test"; + const iconId = parsedUri.query?.get("iconId") ?? undefined; const amountEffectiveStr = parsedUri.query?.get("amountEffective"); if (!amountEffectiveStr) { throw Error("missing amountEffective option"); @@ -578,6 +583,9 @@ async function addFakeTx( purse_expiration: AbsoluteTime.toProtocolTimestamp(timestamp), summary, }; + if (iconId != null) { + ct.icon_id = iconId; + } const contractTermsHash = ContractTermsUtil.hashContractTerms(ct); const contractPair = await wex.cryptoApi.createEddsaKeypair({}); const mergePair = await wex.cryptoApi.createEddsaKeypair({});