Fix wallet status when wallet is unreachable (#79) #80

Closed
triesap wants to merge 33 commits from fix/79-wallet-status-unavailable into dev
Collaborator

Closes #79

Closes #79
triesap added 3 commits 2026-02-18 23:08:52 +00:00
hodlbod requested changes 2026-02-18 23:16:19 +00:00
@@ -43,0 +60,4 @@
const checkNwcStatus = async () => {
try {
await withTimeout(getNwcClient().getInfo(), 5000)
Owner

Just do const ok = await Promise.race(getNwcClient().getInfo().then(always("connected")), sleep(5000).then(always("unavailable"))). Replaces 40 lines of code with 4, and it's much easier to follow.

Just do `const ok = await Promise.race(getNwcClient().getInfo().then(always("connected")), sleep(5000).then(always("unavailable")))`. Replaces 40 lines of code with 4, and it's much easier to follow.
hodlbod marked this conversation as resolved
@@ -43,0 +112,4 @@
if (requestId === walletStatusRequestId) {
walletStatus = nextStatus
}
})()
Owner

A nice little helper for this pattern is the call function. It's just a little prettier.

A nice little helper for this pattern is the `call` function. It's just a little prettier.
triesap added 1 commit 2026-02-19 00:44:48 +00:00
Owner

Merged via 6d99e296

Merged via 6d99e296
hodlbod closed this pull request 2026-02-24 23:46:08 +00:00
hodlbod deleted branch fix/79-wallet-status-unavailable 2026-02-24 23:46:11 +00:00

Pull request closed

Sign in to join this conversation.