fix(wallet): wire websocket config through module install #163

Merged
padreug merged 1 commit from fix/wallet-websocket-config into dev 2026-09-22 21:06:10 +00:00

1 commit

Author SHA1 Message Date
a62af8bd16 fix(wallet): wire websocket config through module install
Every websocket setting in `app.config.ts` was ignored. The service read
`(window as any).appConfig`, which nothing in the codebase ever assigns,
so the lookup was always undefined and the service silently ran on its
own hardcoded defaults — including `VITE_WEBSOCKET_ENABLED`, which could
not actually disable the websocket.

The config was already being passed correctly: `src/wallet-app/app.ts`
registers the module with `appConfig.modules.wallet`, and the plugin
manager forwards it as `install(app, { config })`. The service just
wasn't reading from there. It now takes the config through its
constructor, merged over an exported `DEFAULT_WEBSOCKET_CONFIG`.

Using install options rather than importing `@/app.config` directly
matters here: the hub config no longer declares a wallet module at all
(the wallet ships only as a standalone PWA), so a direct import would
resolve to a config with no wallet section.

Verified in the built bundle: `maxReconnectAttempts:3` from
`src/wallet-app/app.config.ts` is present alongside the default of 5,
and no `window.appConfig` read remains.
2026-09-22 22:44:26 +02:00