-
-
Notifications
You must be signed in to change notification settings - Fork 364
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
feat: Auto teleport V1 #7711
feat: Auto teleport V1 #7711
Conversation
✅ Deploy Preview for koda-canary ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
AI-Generated Summary: This pull request introduces several modifications and functionality across eight different files. Modifications include implementation of functions related to balance checks in multiple chains and auto-teleport feature. Significant changes are also found within the teleport files, including expansions to the enumerations for chains and allowed transitions. New functions including 'calculateUsd', 'getBalance', and 'fetchMultipleBalance' are created for balance calculations. Additionally, the creation of 'AutoTeleportActionButton.vue', 'useAutoTeleport.ts', and 'useMultiBalance.ts' extend the application's functionality. Some existing code blocks have been reduced or noticeably modified, such as the switch block within 'getBalance' function within 'useBalance.ts' and removal of 'getBalance' implementation in 'MultipleBalances.vue'. |
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.
Good job! Thank you for the code refactoring.
components/buy/Buy.vue
Outdated
items.value.map(ShoppingCartItemToTokenToBuy), | ||
items.value.map((item) => item.name), | ||
items.value.map((item) => item?.name), |
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.
Why? Is it possible that the item is equal to null
or undefined
?
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 again.
do not close conversations on behalf of the reviewer
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.
duly noted
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.
So is there any clarification here? 👀
wow, I noticed this, congratulations @hassnian ! |
#7711 (comment) updated @yangwao if you want me to test auto-teleport on Polkadot Asset Hub, please fund the following account for collection and nft creation: 1CBmjqJvV1ha8BPQ5JAXGEzeJBLmGHNG9gYg96eC1dnjH5W |
utils/balance.ts
Outdated
return ( | ||
(await api.query.tokens.accounts( | ||
address, | ||
tokenId, | ||
)) as PalletBalancesAccountData | ||
).free.toString() | ||
} | ||
|
||
return await balanceOf(api, address) |
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.
mind you there is no need for return await
a simple return
would return a promise the same
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.
indeed, only first one is needed
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.
Please resolve the code conflict
done |
Code Climate has analyzed commit bf629cf and detected 10 issues on this pull request. Here's the issue category breakdown:
View more on Code Climate. |
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
i get the same error on canary not sure why , any idea @kodadot/internal (check video 👆), already checked txFee and collectionTotalDeposit
can do that on follow up or when I'm back fyi, got something to do and will be afk for a couple of days , will be back on Monday maybe earlier |
yes, I'm gonna test it myself and would be pro merging it as I sense some dragons might appear or some edge cases over time. |
lot of effort and worked perfectly, looking forward! |
😍 Perfect, I’ve sent the payout 🪅 Let’s grab another issue and get rewarded! |
@prury if there is something, let's create follow up, for me buying worked and that was primary goal for this one, happy to learn if there any bugs in follow up isues |
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
Context
Did your issue had any of the "$" label on it?
Community participation
Screenshot 📸
Copilot Summary
🤖 Generated by Copilot at c55e671
This pull request improves the functionality and user experience of the NFT gallery by adding support for cross-chain transfers of NFTs and displaying multiple balances for different chains and tokens. It introduces new composables, components, and utils to handle the logic and UI for auto teleport, multi balance, and teleport routes. It also simplifies and refactors some existing code in
MultipleBalances.vue
andTeleport.vue
.🤖 Generated by Copilot at c55e671