fix: show funding warning when light-mode wallet has no xDAI#32
Open
crtahlin wants to merge 1 commit into
Open
fix: show funding warning when light-mode wallet has no xDAI#32crtahlin wants to merge 1 commit into
crtahlin wants to merge 1 commit into
Conversation
The funding monitor previously skipped entirely in light mode, so when a node had swap-enable: true but an empty wallet, Bee would crash-loop with no UI indication. The user saw "Starting Bee node…" forever. - Run funding monitor in both ultra-light and light modes - Expose needsFunding flag on /status when light-mode wallet is unfunded - Show funding banner in UI when needsFunding is true, bypassing the startup overlay that was hiding it - Add tests for funding-monitor and status modules AI-assisted implementation. Closes #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
if (currentMode === 'light') return), so when a node hadswap-enable: truebut an empty wallet, Bee crash-looped with no UI indication — the user saw "Starting Bee node…" forever.needsFundingflag on/statusendpoint. In light mode, the monitor polls wallet balance and sets this flag when xDAI is below threshold.needsFundingis true, bypassing the startup overlay that was previously hiding it.Closes crtahlin#1
Changed files
src/funding-monitor.tsneedsFundingstate +getNeedsFunding()export; in light mode set flag based on wallet balancesrc/status.tsneedsFunding: booleanto Status interface, sourced fromgetNeedsFunding()ui/src/api/client.tsneedsFunding?: booleanto frontend Status typeui/src/components/Layout.tsxstatus?.needsFundingin funding warning condition; bypass startup overlay whenneedsFundingis trueCLAUDE.mdtest/funding-monitor.spec.tsdetectMode(),getNeedsFunding(),startMonitorIfNeeded()test/status.spec.tsgetStatus()with/withoutneedsFundingTest plan
AI-assisted implementation.