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

Refactor supported routes fetching #2875

Open
wants to merge 7 commits into
base: development
Choose a base branch
from

Conversation

artursapek
Copy link
Collaborator

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

Copy link

netlify bot commented Oct 24, 2024

👷 Deploy request for wormhole-connect pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 1496e5d

Copy link

netlify bot commented Oct 24, 2024

👷 Deploy request for wormhole-connect-mainnet pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 1496e5d


const { token, destToken, fromChain, toChain, amount } = useSelector(
(state: RootState) => state.transferInput,
);

const { toNativeToken } = useSelector((state: RootState) => state.relay);

const [debouncedAmount] = useDebounce(amount, 500);
Copy link
Collaborator Author

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.

@artursapek artursapek force-pushed the refactor-supported-routes-fetching branch from 79588a1 to 852e351 Compare October 28, 2024 14:52
@artursapek artursapek force-pushed the refactor-supported-routes-fetching branch from 852e351 to 1496e5d Compare November 1, 2024 20:40
Copy link
Collaborator

@emreboga emreboga left a comment

Choose a reason for hiding this comment

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

LGTM!

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.

2 participants