-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
AssetHub: Fee payment with any sufficient asset #11229
Conversation
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 think we can better optimize the way we handle chains that support using assetId's. Even if the support only extends to assset-hub (statemine, statemint) we can better improve our workflow here.
The best approach IMO is to see if the necessary assets pallet exists (there might be some additional checks we can make to ensure we can pay with assets for fees) - check what the palletIndex is (for inputting in the multilocation) - and then from there offer support for paying with assets for fees.
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.
Amazing job! 👍
* feat: created useAssetIds and useAssetInfo hook * feat: created pay with asset component * feat: add paywith asset component with Transfer modal * fix: signer options as prop * fix: payment info * feat: created PayWithAsset provider and integrated with transfer form * chore: rename variable * fix: PayWithAsset provider wrapping * feat: integrate PayWithAsset context and enhance asset info fetching * fix: some build errors * refactor: update imports and simplify getFeeAssetLocation function * refactor: simplify component structure and update PayWithAsset import paths * fix: all build errors * fix: avoid redundant type * feat: added translation * feat: enhance fee payment info & fee asset handling * fix: translations ordering * fix: remove redundant types and hooks * chore: added statemine chain * refactor: generalize fee acceptance check for non-native assets * fix: remove constants and generalize palletIndex
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
📝 Description
This PR introduces the ability to select an asset for paying fees. For example, Asset Hub allows fees to be paid in sufficient assets like USDt and USDC. Initially, this feature will be implemented for the Balance Transfer component, with plans to extend it across other relevant pages/components in the future.
Screen.Recording.2025-02-03.at.16.11.19.mov
✅ Tasks
PayWithAsset
component which allow users to choose asset to pay fee