Wonderland-Money / wonderland-frontend

MIT License
228 stars 296 forks source link

Stake or unstake doesn't show immediately #44

Open meisnothim opened 2 years ago

meisnothim commented 2 years ago

Describe the bug in the case when I approve my TIME or MEMO tokens, the UI doesn't update immediately after that, as I need to refresh my screen for it to update. if I click on approve again, it will only approve it again...

To Reproduce Steps to reproduce the behavior:

  1. Go to 'Stake' or 'Unstake' tab
  2. Click on 'approve' and confirm the tx
  3. after that the UI is still showing 'approve' button and not 'stake' or 'unstake' button

Expected behavior Once a user approve the smart contract for spending time on their behalf, and the 'Approval' has been received, the UI needs to show 'stake' or 'unstake' button instead of being stuck at showing approve button without the need to refresh the page.

s1k2614 commented 2 years ago

Hello, maybe you need to check if you have enough AVAX in your wallet to pay gas fees. If thats the case, make sure that you are on the Avalanche Network. For further help, I would need more information... any messages from the website?

meisnothim commented 2 years ago

The issue is only with the UI doesn't update instantly, not sure if the problem still exists though

On Fri, Dec 17, 2021, 1:43 PM s1k2614 @.***> wrote:

Hello, maybe you need to check if you have enough AVAX in your wallet to pay gas fees. If thats the case, make sure that you are on the Avalanche Network. For further help, I would need more information... any messages from the website?

— Reply to this email directly, view it on GitHub https://github.com/Wonderland-Money/wonderland-frontend/issues/44#issuecomment-996693988, or unsubscribe https://github.com/notifications/unsubscribe-auth/AL6YNXQFCUXVRPEIXS5CJ3TURMV7BANCNFSM5JGNJU7A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you authored the thread.Message ID: @.***>

0xRowdy commented 2 years ago

The issue is only with the UI doesn't update instantly, not sure if the problem still exists though On Fri, Dec 17, 2021, 1:43 PM s1k2614 @.> wrote: Hello, maybe you need to check if you have enough AVAX in your wallet to pay gas fees. If thats the case, make sure that you are on the Avalanche Network. For further help, I would need more information... any messages from the website? — Reply to this email directly, view it on GitHub <#44 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AL6YNXQFCUXVRPEIXS5CJ3TURMV7BANCNFSM5JGNJU7A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you authored the thread.Message ID: @.>

Normally blockchain transactions take a little time to validate. This is most likely why you are not seeing an instant update to the UI. The site needs to get data back after the transaction is validated in order to update the UI.