Closed Serhy closed 4 years ago
@Serhy I just tested the Zerion Dapp in Metamask and the same behaviour happens.
The problem is with the Dapp itself, and not with Status. A Dapp should watch for account changes and then react accordingly. That's why Cryptokitty and Sablier don't have the issue.
One way to fix it inside Status would be to force refresh the Dapp when we switch accounts, but it is not something we should do. Metamask did do that before, but they stopped because it was bad UX to force a refresh. Here is how they recommend Dapps check the accounts: https://github.com/MetaMask/faq/blob/master/DEVELOPERS.md#ear-listening-for-selected-account-changes
Also, in Embark we handle the account changes for the Dapp, but Zerion doesn't use Embark, it uses Truffle.
So, IMO, we should move this issue to the Zerion repo: https://github.com/zeriontech/defi-sdk
Bug Report
Problem
When account is changed in Zerion Dapp - there is no request to grant permissions for address asked. Also, after page refreshed the address in Dapp is different to account which is selected There is no problem with simpledapp.eth or cryptokitties or pay.sablier.finance but
Zerion
Expected behavior
When different account selected in Zerion then page reloads and permission to different account is asked. Cookies flushed after that so the address value pick up that different account address
Actual behavior
When different account selected in Zerion then page reloads but NO permission to different account is asked. Address keep staying the same it was before
Reproduction
Open Status and create new account
Navigate to Wallet and
Add account
->Generate an account
Now in
Browser
opendap.ps
->Zerion
dappTap
Allow
to grant permission toStatus account
Change account to different one by the account button at the bottom of webview
Additional Information
Status version: develop
Operating System: Android and iOS