2 suggestions
Optional improvements
[suggestion] · Receive preference save failures remain invisible in the GUI
An I/O failure leaves the selected receive type active for the session but restores the previous saved preference, without telling the user that the default will revert after restart.
Location: qml/models/walletqmlmodel.cpp:1174 (head).
Details and suggested fix
When settings cannot be written, PersistSettings() restores the previous persistent value, but m_receive_address_type continues to take precedence for this session. The worker only logs the error and its GUI completion is empty. Return the error to the completion and show a non-blocking Receive warning while preserving the usable address and draft. Keep the intentional -nosettings early return silent. The picker follows the actual address type and does not claim that persistence succeeded; reselecting that type already retries without replacing the address or draft. Ordinary write failures also lacked a GUI warning before this PR, so this is a design recommendation for the new failure-handling path rather than a newly introduced correctness defect.
[suggestion] · Test helper defaults leave future Receive tests outside the settings sandbox
A future node-backed Receive test using the helpers' default gArgs could overwrite the developer's default settings.json; no current caller triggers this write.
Location: test/test_walletqmlmodel.cpp:595 (head).
Details and suggested fix
Preference saves now use the supplied ArgsManager directly rather than MockNode. MakePasswordWalletModel() defaults to gArgs, and MakeWalletModel() inherits the same default through the constructor. The unit-test binary does not sandbox Core's datadir or settings path, and this suite selects MAIN. A future node-backed Receive test using these defaults would therefore target the default datadir's top-level settings.json. If that directory is writable, WriteSettingsFile() can replace the existing file with test-only settings because it serializes only the in-memory rw_settings. No checked-in caller currently triggers this: the default-argument node-backed tests exercise send/PSBT paths, and the Receive persistence tests pass fixture.args. Require an explicit isolated ArgsManager& whenever either helper receives a node, using ReceiveAddressSettings for tests that need persistence.