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

fix(explorer): cast string SupportedChainId to number #3624

Merged
merged 1 commit into from
Jan 15, 2024

Conversation

alfetopito
Copy link
Collaborator

Summary

Fixes #3621

Properly identify gchain network id and use the correct rpc provider (not infura).

To Test

  1. Open a gchain order such as 0xf8def1173a59451d5d2d5db2f57cfabe5cfa3ad0cd6d8d63e602dc66bb1e76d35b0abe214ab7875562adee331deff0fe1912fe4265aa8bdd
  • Should load
  • Other networks should load too

Background

The code was ignoring TS and casting the SupportedChainId enum value (number) to the type itself.
In the end, this check was failing because '100' !== 100

if (networkId === SupportedChainId.GNOSIS_CHAIN) {

@alfetopito alfetopito self-assigned this Jan 12, 2024
Copy link

vercel bot commented Jan 12, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
cosmos ✅ Ready (Inspect) Visit Preview Jan 12, 2024 5:46pm
explorer-dev ✅ Ready (Inspect) Visit Preview Jan 12, 2024 5:46pm
swap-dev ✅ Ready (Inspect) Visit Preview Jan 12, 2024 5:46pm
widget-configurator ✅ Ready (Inspect) Visit Preview Jan 12, 2024 5:46pm

Copy link
Contributor

@elena-zh elena-zh left a comment

Choose a reason for hiding this comment

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

Works great in any chain!

@shoom3301 shoom3301 added the RELEASE Included in the release that is being closed label Jan 15, 2024
@alfetopito alfetopito merged commit 784ce32 into develop Jan 15, 2024
13 checks passed
@alfetopito alfetopito deleted the fix/3621_fix-gchain-explorer branch January 15, 2024 09:29
@github-actions github-actions bot locked and limited conversation to collaborators Jan 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
RELEASE Included in the release that is being closed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Explorer] Can't load gnosis chain order
3 participants