-
Notifications
You must be signed in to change notification settings - Fork 63
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 supported routes fetching #2875
base: development
Are you sure you want to change the base?
Refactor supported routes fetching #2875
Conversation
👷 Deploy request for wormhole-connect pending review.Visit the deploys page to approve it
|
👷 Deploy request for wormhole-connect-mainnet pending review.Visit the deploys page to approve it
|
|
||
const { token, destToken, fromChain, toChain, amount } = useSelector( | ||
(state: RootState) => state.transferInput, | ||
); | ||
|
||
const { toNativeToken } = useSelector((state: RootState) => state.relay); | ||
|
||
const [debouncedAmount] = useDebounce(amount, 500); |
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.
this debounce is redundant with another one in AmountInput
. causes unneeded delay.
79588a1
to
852e351
Compare
852e351
to
1496e5d
Compare
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.
LGTM!
This change moves the "supported routes" list out of Redux, because the only place we really need it is the
useSupportedRoutesWithQuotes
hook. It is now fetched in there and pipelined into the downstream quotes call.Here is a loom demonstrating the reason I made this change in the first place... it improves how the UI transitions through the loading state:
https://www.loom.com/share/5aab31c51e8346e09bd533d05ffde5e5