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

WEB-6: useTrackTransfer optimization: sleep until 1 minute before transfer ETA #3212

Conversation

artursapek
Copy link
Collaborator

@artursapek artursapek commented Jan 21, 2025

This makes useTrackTransfer wait until 1 minute before the transfer is estimated to complete, before trying to fetch updates using track.

I also removed stateChanged since it's always identical to isCompleted. (It wasn't originally, but after some code changes it's now redundant)

The sleepTime variable is not actually that important - the retries are generally handled downstream in the SDK code. Here we only hit the sleepTime code if track throws an error.

Copy link

netlify bot commented Jan 21, 2025

Deploy Preview for wormhole-connect-mainnet ready!

Name Link
🔨 Latest commit c455641
🔍 Latest deploy log https://app.netlify.com/sites/wormhole-connect-mainnet/deploys/6791087ddaa2ce00081e7084
😎 Deploy Preview https://deploy-preview-3212--wormhole-connect-mainnet.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Jan 21, 2025

Deploy Preview for wormhole-connect ready!

Name Link
🔨 Latest commit c455641
🔍 Latest deploy log https://app.netlify.com/sites/wormhole-connect/deploys/6791087d8c7f8d0008e2ed2b
😎 Deploy Preview https://deploy-preview-3212--wormhole-connect.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@artursapek artursapek changed the title useTrackTransfer optimization: sleep until 1 minute before transfer ETA WEB-6: useTrackTransfer optimization: sleep until 1 minute before transfer ETA Jan 21, 2025
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!

@artursapek artursapek merged commit 9cc43ce into wormhole-foundation:development Jan 22, 2025
16 checks passed
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