-
Notifications
You must be signed in to change notification settings - Fork 33
chore(checkout): Additional overrides to facilitate the Immutable dev env #2607
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
Conversation
View your CI Pipeline Execution ↗ for commit f178666.
☁️ Nx Cloud last updated this comment at |
|
||
return { balances }; | ||
return balanceResults.reduce((acc, resp) => { | ||
if (resp.status !== 'fulfilled' || resp.value.balance === 0n) return acc; |
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.
The change here is to filter out any zero balances. When fetching balances from the RPC it returns all tokens, even zero balance ones. So we need to filter these out to maintain the same behaviour as when we use blockscout.
@@ -91,18 +110,23 @@ export class CheckoutConfiguration { | |||
this.isBridgeEnabled = config.bridge?.enable ?? DEFAULT_BRIDGE_ENABLED; | |||
this.publishableKey = config.publishableKey ?? '<no-publishable-key>'; | |||
|
|||
this.networkMap = networkMap(this.isProduction, this.isDevelopment); | |||
this.networkMap = config.overrides?.networkMap ?? networkMap(this.isProduction, this.isDevelopment); |
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 changes are mostly about reading from the overrides
@@ -1,10 +1,13 @@ | |||
import { Passport } from "@imtbl/passport"; | |||
import { Environment } from "@imtbl/config"; | |||
import * as x from "@imtbl/x-client"; |
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.
Not needed.
Summary
Allows overrides to be passed to the checkout constructor so that it can be used in envs other than sandbox and prod.
Detail and impact of the change
Added
Changed
Deprecated
Removed
Fixed
Security
Anything else worth calling out?