BuidlZone-Labs/zicket-web
Wallet SDK Caches First Transaction Hash Indefinitely
已关闭
#175 创建于 2026年7月29日
Stellar Wavebugfrontendhelp wantedweb3
仓库指标
- 星标
- (4 个星标)
- PR 合并指标
- (PR 指标待抓取)
描述
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
- Separate SDK module loading from transaction execution.
- 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