-
Notifications
You must be signed in to change notification settings - Fork 300
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Network checks refactor #750
Conversation
const isEIP1559SupportedNetwork = computed( | ||
() => appNetworkConfig.supportsEIP1559 | ||
); | ||
const isGnosisSupportedNetwork = computed(() => | ||
GP_SUPPORTED_NETWORKS.includes(chainId) | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These should probably be defined in a relevant composable? Perhaps useWeb3
for isEIP1559SupportedNetwork
and useGnosis
for isGnosisSupportedNetwork
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've moved isEIP1559SupportedNetwork
to useWeb3
. I'd like to do the same for isGnosisSupportedNetwork
but we'd need to fill in all the other props it needs as well. Calling useGnosis
seems to make the assumption that we're actively trying to trade through it which seems overkill for just checking whether we're on a supported network.
Description
Pulled out of #747
As we're supporting more networks I've refactored some of the checks for which network we're connected to so that they are more direct about what they're checking for (i.e. "does this network support EIP1559?" rather than "are we on mainnet?")
Type of change
How should this be tested?
Check that GP and EIP1559 toggles doesn't turn up on unexpected networks
Checklist:
master
if hotfix,develop
if not