Currently, with e.g. Metamask installed, and e.g. mainnet selected, the app will throw an exception about not being able to find the contract, but not tell the user anything about it. In that case, the loading indicator will just be visible indefinitely.
The app should catch that error and notify the user to make sure they have the right chain selected.
Currently, with e.g. Metamask installed, and e.g. mainnet selected, the app will throw an exception about not being able to find the contract, but not tell the user anything about it. In that case, the loading indicator will just be visible indefinitely.
The app should catch that error and notify the user to make sure they have the right chain selected.
We have the available_networks method in kredits-contracts (Kredits.available_networks()) that can be used.
After the window.ethereum.enable() call we should be able to check for window.ethereum.networkVersion which returns a string of the network ID (should be confirmed if that is metamask specific or a general provider standard). https://github.com/67P/kredits-web/blob/master/app/services/kredits.js#L121
maybe @haythem96 you want to have a look at this?
We have the [`available_networks`](
https://github.com/67P/kredits-contracts/blob/master/lib/kredits.js#L86) method in kredits-contracts (`Kredits.available_networks()`) that can be used.
After the `window.ethereum.enable()` call we should be able to check for `window.ethereum.networkVersion` which returns a string of the network ID (should be confirmed if that is metamask specific or a general provider standard). https://github.com/67P/kredits-web/blob/master/app/services/kredits.js#L121
maybe @haythem96 you want to have a look at this?
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Currently, with e.g. Metamask installed, and e.g. mainnet selected, the app will throw an exception about not being able to find the contract, but not tell the user anything about it. In that case, the loading indicator will just be visible indefinitely.
The app should catch that error and notify the user to make sure they have the right chain selected.
We have the
available_networksmethod in kredits-contracts (Kredits.available_networks()) that can be used.After the
window.ethereum.enable()call we should be able to check forwindow.ethereum.networkVersionwhich returns a string of the network ID (should be confirmed if that is metamask specific or a general provider standard). https://github.com/67P/kredits-web/blob/master/app/services/kredits.js#L121maybe @haythem96 you want to have a look at this?
@bumi sure will look at that...