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
Support XCM #394
Support XCM #394
Conversation
@impelcrypto Updated |
…star-apps into feature/xcm-asset
Visit the preview URL for this PR (updated for commit 661b650): https://astar-apps--pr394-feature-xcm-asset-qskhh23h.web.app (expires Wed, 25 May 2022 14:16:34 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 |
Hi @impelcrypto , I updated RelayWidget and hooks for binding the data on that. I'll keep updating hooks & testing stuff, but you can go ahead implementation of bridge from now on. |
* feat: added 'XCM' in sidebar * feat: modified widget styling * styling: added XCM assets panel for native accounts * feat: added ModalXcmBridge * feat: updated formattedSelectedTokenBalance * refactor: clean up * refactor: clean up (2) * feat: added ModalXcmTransfer * fix: removed unused file * fix: added 'isXcmCompatible' property in xcmToken var * fix: clean up * refactor: added comments * refactor: isEnableXcm condition * feat: added 'XCM bridge to EVM network' UI * fix: removed XcmAssetList from NativeAssetList.vue * fix: removed XCM tab from sidebar
…star-apps into feature/xcm-asset
* feat: added DOT and KSM tokens in EVM assets * fix: update styling * fix: estimate gas
* fix: fetch user balance * fix: conflicts * feat: update the total native assets (USD) * refactor: clean up * refactor: clean up
resetStates(); | ||
}; | ||
|
||
const chainIcon = computed<{ src: string; dest: string }>(() => { |
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.
I don't think this is a scalable solution. Why don't we create an interface that handles the chain data like name and icon (and maybe the asset info too), and move that to a config file?
For example,
interface XcmNetwork {
name: 'Polkadot';
icon: './path/to/dot.png';
endpoint: 'wss://...';
asset: XcmAsset;
}
and create an object with the type:
interface XcmChannel {
astar: XcmNetwork[];
shiden: XcmNetwork[];
shibuya: XcmNetwork[];
}
This is just an example, but because we plan to add more channels and we want this process to be scalable, code structure is key I think
* fix: update token image for DOT * fix: font size for XCM bridge modal * fix: font size for XCM bridge modal (2) * fix: fetch the existential data from API * fix: updated warning section * refactor: clean up * feat: changed oreder of the assets * fix: decimals calculation * fix: words * feat: update the XCM asset balances after bridge transaction * styling: font size in warning text
* Asset transfer to native * Asset transfer to EVM * Code cleanup
* check if the non-zero balance when transfer * refactor * set i18n
* fix: words * fix: disabled faucet button * fix: enabled max button for XCM assets token transfer * fix: decimal calculation for XCM assets transfer * fix: disabled faucet button for EVM account
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.
LGTM
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.
LGTM!
Pull Request Summary
Check list
This pull request makes the following changes: