Skip to content
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

Added Custom Network conditional #29

Merged
merged 3 commits into from
Feb 16, 2021
Merged

Conversation

BboyAkers
Copy link
Contributor

@BboyAkers BboyAkers commented Feb 14, 2021

Custom networks now return an empty url string instead of broken etherscan url when passed in a custom network id.
This PR builds on top of this Github Issue and should fix the broken etherscan url for custom networks. MetaMask/metamask-extension#5631

@BboyAkers BboyAkers requested a review from a team as a code owner February 14, 2021 06:53
src/prefix-for-network.ts Outdated Show resolved Hide resolved
Copy link
Member

@Gudahtt Gudahtt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you update the other two modules as well? account-link and token-tracker-link also use the getPrefixForNetwork function in the same way.

src/explorer-link.ts Outdated Show resolved Hide resolved
@BboyAkers
Copy link
Contributor Author

Done! 🙂

Copy link
Member

@Gudahtt Gudahtt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@Gudahtt Gudahtt merged commit cc59f27 into MetaMask:master Feb 16, 2021
Gudahtt added a commit that referenced this pull request Feb 16, 2021
I decided to consider #29 as non-breaking, as the type signature hasn't
changed, and previously the link we would return was blatantly wrong.
If anyone gets this update without handling the empty string case,
their use will still be less broken now, arguably.
@Gudahtt Gudahtt mentioned this pull request Feb 16, 2021
@BboyAkers BboyAkers deleted the network-check branch February 16, 2021 16:55
Gudahtt added a commit that referenced this pull request Feb 16, 2021
I decided to consider #29 as non-breaking, as the type signature hasn't
changed, and previously the link we would return was blatantly wrong.
If anyone gets this update without handling the empty string case,
their use will still be less broken now, arguably.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants