fix race calling open before wallet-rpc ready

This commit is contained in:
2026-08-02 14:26:49 +08:00
parent af6251669a
commit 4270d380fb
3 changed files with 6 additions and 15 deletions
@@ -101,6 +101,11 @@ export const MoneroWallet = () => {
if (installed && !running) {
await start()
await checkStatus()
} else if (startInFlight) {
// a start is already in flight (e.g. triggered by init);
// wait for it so we don't call open before the server is up
await startInFlight.catch(() => {})
await checkStatus()
}
if (!running) {
error = 'Wallet server failed to start. Please try again.'