BuidlZone-Labs/zicket-web

Wallet SDK Caches First Transaction Hash Indefinitely

Chiusa

#175 aperta il 29 lug 2026

 (8 commenti) (0 reazioni) (1 assegnatario)TypeScript (43 fork)auto 404
Stellar Wavebugfrontendhelp wantedweb3

Metriche repository

Star
 (4 stelle)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

Category

Bug

Priority

High

Description

In lib/walletSdk.ts, loadPromise stores the resolved dynamic import promise globally in a module variable. Once loadWalletSDK() resolves, subsequent purchases or wallet connection triggers return the exact same cached mock transaction hash string forever.

Evidence from lib/walletSdk.ts#L30-L57:

let loadPromise: Promise<string> | null = null;
export async function loadWalletSDK(): Promise<string> {
  if (!loadPromise) {
    loadPromise = new Promise<string>(...);
  }
  return loadPromise;
}

Proposed Solution

  1. Separate SDK module loading from transaction execution.
  2. Cache the SDK instance, but execute transaction signing dynamically per payment request so each transaction receives a unique hash.

Acceptance Criteria

  • Wallet SDK package dynamically loads once.
  • Every transaction signing request generates a unique transaction hash.
  • Failed transactions can be retried without stale hash collisions.

Files

  • lib/walletSdk.ts

Guida contributor