Description
The dApp compares the wallet's synchronizers against the network wallet-service reports. When that second read fails, useWrongNetwork returns false, which the UI reads as "network is fine". The app stays quiet exactly when it knows nothing.
Steps to reproduce
- Start the stack with
./scripts/dev-stack.sh up
- Point the wallet at another network, such as devnet
- Open the dApp in the first few minutes, before the SV opens a mining round
- See no wrong-network banner
Expected vs actual behavior
Expected: the app warns, or says it cannot check.
Actual: the app shows nothing, and later writes fail with no explanation.
Additional context
fetchAppNetwork in dapp/frontend/src/backend/transferContext.ts reads the synchronizer id off the AmuletRules disclosure from amulet.tap. That call needs an open mining round, so it throws until the SV opens one. useWrongNetwork swallows the error on purpose.
Changes, all in dapp/frontend:
This does not close the hole. The app can only learn its own network from wallet-service, and the only method that answers needs an open round. A complete fix needs a wallet-service method that reports the network without one, which is out of scope here. This issue narrows the window.
Description
The dApp compares the wallet's synchronizers against the network wallet-service reports. When that second read fails,
useWrongNetworkreturnsfalse, which the UI reads as "network is fine". The app stays quiet exactly when it knows nothing.Steps to reproduce
./scripts/dev-stack.sh upExpected vs actual behavior
Expected: the app warns, or says it cannot check.
Actual: the app shows nothing, and later writes fail with no explanation.
Additional context
fetchAppNetworkindapp/frontend/src/backend/transferContext.tsreads the synchronizer id off theAmuletRulesdisclosure fromamulet.tap. That call needs an open mining round, so it throws until the SV opens one.useWrongNetworkswallows the error on purpose.Changes, all in
dapp/frontend:useWrongNetworkreturnsunknown,okorwronginstead of a booleanAppShellstops showing "No deployment" when the check has not answeredThis does not close the hole. The app can only learn its own network from wallet-service, and the only method that answers needs an open round. A complete fix needs a wallet-service method that reports the network without one, which is out of scope here. This issue narrows the window.