You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Kotlin shielded Clear re-registers other wallets with account [0], replacing their account lists #5989
After a shielded Clear on Android, every wallet is registered again with the accounts it had before, and a bind that started after the Clear is not replaced.
Current Behavior
ShieldedService.clearLocalState re-binds the mirror wallet and then calls engineBindOtherWallets, which runs bindEngine(mgr, other.walletId, dbPath) for every other loaded wallet. bindEngine defaults accounts to listOf(0), so:
a wallet that is not the mirror and was bound with other accounts comes back registered with [0];
the mirror wallet is read once before the pass, so a wallet that becomes the mirror and binds, say, [1] after that read can be registered with [0] afterwards. Rust replaces the account set while the service still reports [1].
The same pass is on v5.1-dev.
Possible Solution
Have the wallet coordinator restore the registrations a Clear dropped, or keep each wallet's bound account list in the service and skip a wallet whose bind began after the Clear.
Steps to Reproduce (for bugs)
Load two wallets, A (the mirror) and B, and bind B with accounts other than [0].
Run Clear from A.
B is registered again with [0].
Found in review of #5982 and confirmed by reading packages/kotlin-sdk/sdk/src/main/kotlin/org/dashfoundation/dashsdk/services/ShieldedService.kt. Not reproduced on a device.
Context
Deferred from #5982: #5982 (comment). The behaviour does not depend on how the shielded balance is delivered, so it was left out of that pull request.
Activity