-
Notifications
You must be signed in to change notification settings - Fork 65
feat: allow granular min deposit config #1641
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
base: master
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
| inputTokenSymbol: string | ||
| ) { | ||
| const { MIN_DEPOSIT_USD, MIN_DEPOSIT_USD_OVERRIDES } = getEnvs(); | ||
| const minDepositUsdOverrides = JSON.parse( |
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.
Since we're using a nested JSON in an environment variable, it could be useful to wrap this in a try-catch (or maybe in a new util function like safeParse which does this) in case the type check fails at runtime. Or maybe it's not needed if we don't expect the environment variable to change much - just a thought.
| routes?: { [key: string]: string }; | ||
| originChains?: { [key: string]: string }; | ||
| destinationChains?: { [key: string]: string }; | ||
| tokens?: { [key: string]: string }; |
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.
Think this type could be reusable for other overrides? I like how it goes from most specific to least specific. (Token + Chain) -> (Token) -> (Chain).
No description provided.