-
Notifications
You must be signed in to change notification settings - Fork 203
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
refactor: make getFastBridges
reusable across components
#1056
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
…ge into refactor-getFastBridges
case FastBridgeNames.Connext: | ||
return `https://bridge.connext.network/${tokenSymbol}-from-${slugFrom}-to-${slugTo}?amount=${amount}` | ||
case FastBridgeNames.Across: | ||
return 'https://across.to/bridge' |
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.
Across query params seem not to be working at all anymore.
case FastBridgeNames.Stargate: | ||
return `https://stargate.finance/transfer?srcChain=${slugFrom}&dstChain=${slugTo}&srcToken=${tokenSymbol}` | ||
case FastBridgeNames.Synapse: | ||
return 'https://synapseprotocol.com/' |
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.
Synapse doesn't use query params, but detects the currently connected network.
…e into refactor-getFastBridges
} | ||
} | ||
|
||
export function getFastBridges<TransferType extends 'bridge' | 'swap'>({ |
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.
I get the point of having one function, but if we always know when we call which one we want, would not be better to have two function with clear naming? Unless we plan to add a new parameter later
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.
Maybe with a common helper function, but we would only export getFastSwaps
, getFastBridges
obsolete |
Closes #1055