Skip to content

Commit 48d6026

Browse files
peachbitsclaude
andcommitted
Add regression test for imported Monero backend rule on empty accounts
checkImportedWalletSettings must still force an imported lws wallet onto the full node when the account has never configured Monero servers (its userSettings is the empty object edge-core-js initializes). Documents that the 'Expected a boolean, got undefined at .enableCustomServers' crash from older builds is resolved by routing every asMoneroUserSettings consumer through asMaybe. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 79ead81 commit 48d6026

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/__tests__/moneroImportSettings.test.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,4 +89,12 @@ describe('monero checkImportedWalletSettings', () => {
8989
)
9090
expect(result?.settings.backend).toBe('monerod')
9191
})
92+
93+
test('overrides lws -> monerod for an account with empty user settings', () => {
94+
// A never-configured account stores `{}`; it resolves to Edge LWS, so an
95+
// imported lws wallet must still be pushed to the full node.
96+
const result = check({ backend: 'lws' }, {})
97+
expect(result?.settings.backend).toBe('monerod')
98+
expect(result?.warning).toBeTruthy()
99+
})
92100
})

0 commit comments

Comments
 (0)