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
When multiple Midnight accounts exist in Lace (e.g., Midnight #0 and Midnight #1), the DApp Connector API always returns Midnight #0's keys regardless of which account is currently active in the Lace UI.
Calling connect('preprod') followed by getShieldedAddresses() returns the same shieldedCoinPublicKey and shieldedEncryptionPublicKey whether Midnight #0 or Midnight #1 is selected in Lace. The getUnshieldedAddress() call also always returns Midnight #0's address.
The InitialAPI object exposes apiVersion, name, icon, and rdns — no mechanism for account selection. The ConnectedAPI has no switchAccount() or similar method.
What did you expect to happen?
connect('preprod') should return the keys and addresses for the currently active account in Lace. If Midnight #1 is selected in the Lace UI, all ConnectedAPI methods should operate on Midnight #1's state.
Alternatively, if per-session account binding is intended, the connect() flow should present an account picker popup (similar to how MetaMask handles multiple accounts) so the user can choose which account to authorize for the DApp.
Which Lace surface?
Browser extension (Chrome)
Version
lace-extension@2.0.6
What happened?
When multiple Midnight accounts exist in Lace (e.g., Midnight #0 and Midnight #1), the DApp Connector API always returns Midnight #0's keys regardless of which account is currently active in the Lace UI.
Calling
connect('preprod')followed bygetShieldedAddresses()returns the sameshieldedCoinPublicKeyandshieldedEncryptionPublicKeywhether Midnight #0 or Midnight #1 is selected in Lace. ThegetUnshieldedAddress()call also always returns Midnight #0's address.The
InitialAPIobject exposesapiVersion,name,icon, andrdns— no mechanism for account selection. TheConnectedAPIhas noswitchAccount()or similar method.What did you expect to happen?
connect('preprod')should return the keys and addresses for the currently active account in Lace. If Midnight #1 is selected in the Lace UI, allConnectedAPImethods should operate on Midnight #1's state.Alternatively, if per-session account binding is intended, the
connect()flow should present an account picker popup (similar to how MetaMask handles multiple accounts) so the user can choose which account to authorize for the DApp.Steps to reproduce
Environment
@midnight-ntwrk/dapp-connector-api4.0.1@midnight-ntwrk/midnight-js-contracts4.0.4Logs, screenshots, or additional context
No response