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

Only show hardcoded paratimes #267

Merged
merged 1 commit into from
May 11, 2022
Merged

Conversation

lukaw3d
Copy link
Member

@lukaw3d lukaw3d commented May 9, 2022

Testnet already has an unknown runtime registered, and it throws Error: client: no hosted runtime is available when wallet tries to query its accounts.Balances. Hide it for now.

Before After
before after

Copy link

@gw0 gw0 left a comment

Choose a reason for hiding this comment

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

I guess this shouldn't break anything, but it will require explicitly adding new ParaTimes to PARATIME_CONFIG before they are supported.

}
}
}
return runtimeConfig
Copy link

@gw0 gw0 May 10, 2022

Choose a reason for hiding this comment

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

Although this is implicit behavior, but it would be cleaner to explicitly write: return null (or return {})?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yep, and typescript correctly infers the type too. Added return undefined.

(the whole getRuntimeConfig is bad code tho. Something to improve in wallet v2)

@lukaw3d lukaw3d force-pushed the lw/only-hardcoded-paratimes branch from 6389c47 to 0fb12f3 Compare May 10, 2022 18:20
Copy link
Contributor

@pro-wh pro-wh left a comment

Choose a reason for hiding this comment

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

ok as a bandaid. seems kind of oddly reversed. maybe in the next version we can start from the hardcoded list and request specifically those runtimes from the API

@lukaw3d lukaw3d merged commit c5ebba8 into master May 11, 2022
@lukaw3d lukaw3d deleted the lw/only-hardcoded-paratimes branch May 11, 2022 18:28
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.

3 participants