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

fix: Zero balance on transfer when address has DOTs #7687

Merged
merged 1 commit into from
Oct 17, 2023

Conversation

Jarsen136
Copy link
Contributor

@Jarsen136 Jarsen136 commented Oct 16, 2023

Thank you for your contribution to the KodaDot - One Stop Shop for Polkadot NFTs.

👇 __ Let's make a quick check before the contribution.

PR Type

  • Bugfix

Needs QA check

  • @kodadot/qa-guild please review

Context

Did your issue had any of the "$" label on it?

Screenshot 📸

  • My fix has changed UI
image

Copilot Summary

🤖 Generated by Copilot at efb061f

Added identity and balance management to Transfer.vue component. The component now uses useIdentityStore to access and update the user's identity and balance on different networks and accounts.

🤖 Generated by Copilot at efb061f

useIdentityStore
Manages user balance
On KodaDot platform

@Jarsen136 Jarsen136 requested a review from a team as a code owner October 16, 2023 15:16
@Jarsen136 Jarsen136 requested review from preschian and daiagi and removed request for a team October 16, 2023 15:16
@netlify
Copy link

netlify bot commented Oct 16, 2023

Deploy Preview for koda-canary ready!

Name Link
🔨 Latest commit efb061f
🔍 Latest deploy log https://app.netlify.com/sites/koda-canary/deploys/652d53ed6312920008f03401
😎 Deploy Preview https://deploy-preview-7687--koda-canary.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.

@reviewpad reviewpad bot added small Pull request is small waiting-for-review labels Oct 16, 2023
@codeclimate
Copy link

codeclimate bot commented Oct 16, 2023

Code Climate has analyzed commit efb061f and detected 0 issues on this pull request.

View more on Code Climate.

@reviewpad
Copy link
Contributor

reviewpad bot commented Oct 16, 2023

AI-Generated Summary: This pull request includes a fix for the issue where the balance becomes zero on transfer when the address contains DOTs. Changes have been made to the Transfer.vue file where a new function called updateAuthBalance has been introduced. This function updates the balance of the given account ID. The trigger for this function is the change in urlPrefix or at the moment of component mounting. In addition to that, the calculation of the transaction fee has been kept inside onMounted lifecycle hook as well. The useIdentityStore has been used for maintaining user identity details.

@sonarcloud
Copy link

sonarcloud bot commented Oct 16, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
1.0% 1.0% Duplication

@prury
Copy link
Member

prury commented Oct 16, 2023

do they load? yes
Assethubs are taking a bit longer than the others
Basilisk shows RPC error, probably on their end since its not the first time i see this problem
if you switch currencies a few times you get the CORS coingecko error (I'm aware its unrelated), and either the balance won't load or the currency price won't load

@Jarsen136
Copy link
Contributor Author

This PR is mainly solving the issue that the balance would not show when We visit the transfer page directly through URL, without expanding the sidebar.

Basilisk shows RPC error, probably on their end since its not the first time i see this problem

related with #7670

if you switch currencies a few times you get the CORS coingecko error (I'm aware its unrelated), and either the balance won't load or the currency price won't load

related with #7675

@prury
Copy link
Member

prury commented Oct 16, 2023

This PR is mainly solving the issue that the balance would not show when We visit the transfer page directly through URL, without expanding the sidebar.

Basilisk shows RPC error, probably on their end since its not the first time i see this problem

related with #7670

if you switch currencies a few times you get the CORS coingecko error (I'm aware its unrelated), and either the balance won't load or the currency price won't load

related with #7675

yeah i know i know, thanks for linking the issues!

AssetHubs are taking +- 30 seconds to show balance initially, different from the other chains that take +- 5 seconds

@Jarsen136
Copy link
Contributor Author

AssetHubs are taking +- 30 seconds to show balance initially, different from the other chains that take +- 5 seconds

The speed of fetching the balance depends on the RPC call. It only needs a few seconds to load on my side.

Kapture 2023-10-17 at 00 56 03

@prury prury added the S-works-for-me-✅ qa-guild has tested PR from end user perspective and functionality worked label Oct 16, 2023
@yangwao
Copy link
Member

yangwao commented Oct 17, 2023

thanks !

pay 20 usd

@yangwao yangwao merged commit d0fa517 into kodadot:main Oct 17, 2023
15 checks passed
@yangwao
Copy link
Member

yangwao commented Oct 17, 2023

😍 Perfect, I’ve sent the payout
💵 $20 @ 3.73 USD/DOT ~ 5.362 $DOT
🧗 16SjUbGKSdjCdWTy3NNT3JxbRVGGqD4mwkHpc6BD9U2Rp29Z
🔗 0x631c94ddf5a2745b1a04c54b63c5e18167e61aeb7c298c96008a48700487b816

🪅 Let’s grab another issue and get rewarded!
🪄 github.com/kodadot/nft-gallery/issues

@yangwao yangwao added the paid pull-request has been paid label Oct 17, 2023
This was referenced Oct 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
paid pull-request has been paid S-works-for-me-✅ qa-guild has tested PR from end user perspective and functionality worked small Pull request is small waiting-for-review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Zero balance on transfer when address has DOTs
3 participants