unguard pushDappReady()

This commit is contained in:
Jakob Notland 2026-04-03 12:45:57 +02:00
parent 72da1758b3
commit ff2be1347d

View file

@ -339,11 +339,13 @@ export class DappConnectionManager extends EventEmitter<DappConnectionManagerEve
}
}
if (!msg.dapp_discovered) {
this.pushDappReady().catch((e) =>
console.error("[wizardconnect/dapp] Error pushing dapp_ready:", e),
);
}
// Always send dapp_ready when wallet_ready is received — even if the wallet
// previously saw us (dapp_discovered=true). On reconnect after sleep/wake the
// relay may not have persisted the earlier dapp_ready, so the wallet would be
// stuck waiting. Re-sending is safe: the wallet is idempotent on dapp_ready.
this.pushDappReady().catch((e) =>
console.error("[wizardconnect/dapp] Error pushing dapp_ready:", e),
);
this.emit("walletready", msg);
}