-
Notifications
You must be signed in to change notification settings - Fork 40
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
improvement: refresh assets after swap #672
Conversation
BX-836 Made a swap and the DAI didnt show up in my wallet
i swapped arbitrum ETH for DAI and the DAI shows up in my activity feed but dont see the DAI in my wallet https://arbiscan.io/tx/0x2920f1779b30d377baa634ddf7b37b074578bf4d9328b2761ff2209e99bad4c6 |
Here's the packed extension for this build: |
83fafc2
to
abd5380
Compare
Here's the packed extension for this build: |
Here's the packed extension for this build: |
19be59b
to
3768df5
Compare
Here's the packed extension for this build: |
3768df5
to
e780bba
Compare
Here's the packed extension for this build: |
e780bba
to
4319a30
Compare
address: currentAddress, | ||
currency: currentCurrency, | ||
connectedToHardhat, | ||
staleTime: 0, |
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.
@greg-schrammel would love your input here
i'm trying to make tokens data stale for USER_ASSETS_STALE_INTERVAL
secs to then continue fetching the data from backend as usual, that's why i set up a timeout here setting stale time as 0 again, does it make sense?
Here's the packed extension for this build: |
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.
👏 👏 working for me, nice
src/core/utils/transactions.ts
Outdated
const isPendingTransaction = (status: TransactionStatus) => { | ||
return ( | ||
status === TransactionStatus.approving || | ||
status === TransactionStatus.bridging || | ||
status === TransactionStatus.cancelling || | ||
status === TransactionStatus.depositing || | ||
status === TransactionStatus.purchasing || | ||
status === TransactionStatus.receiving || | ||
status === TransactionStatus.sending || | ||
status === TransactionStatus.speeding_up || | ||
status === TransactionStatus.swapping || | ||
status === TransactionStatus.withdrawing | ||
); | ||
}; |
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.
👍
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.
🔥🔥🔥
Here's the packed extension for this build: |
a4fe96f
to
4749262
Compare
Here's the packed extension for this build: |
Here's the packed extension for this build: |
Here's the packed extension for this build: |
Here's the packed extension for this build: |
Here's the packed extension for this build: |
Fixes BX-836
Figma link (if any):
What changed (plus any additional context for devs)
the problem that the ticket is describing is that we don't trigger a new asset discovery request when a swap is made so i applied the same logic we have in the app
I also added
Screen recordings / screenshots
video with audio of me explaining some logs that i left to show that's working
https://www.loom.com/share/9caf4b965d71444a86603d54e9f693ef
What to test
Final checklist
yarn build
).