-
Notifications
You must be signed in to change notification settings - Fork 699
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
Assets in pool with native can be used in query_weight_to_asset_fee
#6080
Assets in pool with native can be used in query_weight_to_asset_fee
#6080
Conversation
bot fmt |
@franciscoaguirre https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/7599192 was started for your command Comment |
@franciscoaguirre Command |
cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs
Outdated
Show resolved
Hide resolved
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.
looks good modulo this comment which should be fixed
Addressing |
bot fmt |
@franciscoaguirre https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/7613871 was started for your command Comment |
bot fmt |
@franciscoaguirre https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/7620641 was started for your command Comment |
@franciscoaguirre Command |
cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs
Outdated
Show resolved
Hide resolved
.into_iter() | ||
.map(|asset_id| asset_id.0) | ||
.any(|location| location == native_asset) { |
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.
not sure if this compiles like this or maybe &native_asset
.into_iter() | |
.map(|asset_id| asset_id.0) | |
.any(|location| location == native_asset) { | |
.iter() | |
.any(|asset_id| asset_id.0 == native_asset) { |
.into_iter() | ||
.map(|asset_id| asset_id.0) | ||
.any(|location| location == native_asset) { |
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.
.into_iter() | |
.map(|asset_id| asset_id.0) | |
.any(|location| location == native_asset) { | |
.iter() | |
.any(|asset_id| asset_id.0 == native_asset) { |
let assets_in_pool_with_native = assets_common::get_assets_in_pool_with::< | ||
Runtime, | ||
xcm::v4::Location | ||
>(&native_token).map_err(|()| XcmPaymentApiError::VersionedConversionFailed)?.into_iter(); |
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 .into_iter()
is not needed now
>(&native_token).map_err(|()| XcmPaymentApiError::VersionedConversionFailed)?.into_iter(); | |
>(&native_token).map_err(|()| XcmPaymentApiError::VersionedConversionFailed)?; |
let assets_in_pool_with_native = assets_common::get_assets_in_pool_with::< | ||
Runtime, | ||
xcm::v4::Location | ||
>(&native_token).map_err(|()| XcmPaymentApiError::VersionedConversionFailed)?.into_iter(); |
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.
>(&native_token).map_err(|()| XcmPaymentApiError::VersionedConversionFailed)?.into_iter(); | |
>(&native_token).map_err(|()| XcmPaymentApiError::VersionedConversionFailed)?; |
Created backport PR for
Please cherry-pick the changes locally and resolve any conflicts. git fetch origin backport-6080-to-stable2407
git worktree add --checkout .worktree/backport-6080-to-stable2407 backport-6080-to-stable2407
cd .worktree/backport-6080-to-stable2407
git reset --hard HEAD^
git cherry-pick -x b4732add46910370443d092a3f479986060f6df5
git push --force-with-lease |
Created backport PR for
Please cherry-pick the changes locally and resolve any conflicts. git fetch origin backport-6080-to-stable2409
git worktree add --checkout .worktree/backport-6080-to-stable2409 backport-6080-to-stable2409
cd .worktree/backport-6080-to-stable2409
git reset --hard HEAD^
git cherry-pick -x b4732add46910370443d092a3f479986060f6df5
git push --force-with-lease |
…paritytech#6080) A follow-up to paritytech#5599. Assets in a pool with the native one are returned from `query_acceptable_payment_assets`. Now those assets can be used in `query_weight_to_asset_fee` to get the correct amount that needs to be paid. --------- Co-authored-by: command-bot <>
…paritytech#6080) A follow-up to paritytech#5599. Assets in a pool with the native one are returned from `query_acceptable_payment_assets`. Now those assets can be used in `query_weight_to_asset_fee` to get the correct amount that needs to be paid. --------- Co-authored-by: command-bot <>
…paritytech#6080) A follow-up to paritytech#5599. Assets in a pool with the native one are returned from `query_acceptable_payment_assets`. Now those assets can be used in `query_weight_to_asset_fee` to get the correct amount that needs to be paid. --------- Co-authored-by: command-bot <>
…paritytech#6080) A follow-up to paritytech#5599. Assets in a pool with the native one are returned from `query_acceptable_payment_assets`. Now those assets can be used in `query_weight_to_asset_fee` to get the correct amount that needs to be paid. --------- Co-authored-by: command-bot <>
…paritytech#6080) A follow-up to paritytech#5599. Assets in a pool with the native one are returned from `query_acceptable_payment_assets`. Now those assets can be used in `query_weight_to_asset_fee` to get the correct amount that needs to be paid. --------- Co-authored-by: command-bot <>
…paritytech#6080) A follow-up to paritytech#5599. Assets in a pool with the native one are returned from `query_acceptable_payment_assets`. Now those assets can be used in `query_weight_to_asset_fee` to get the correct amount that needs to be paid. --------- Co-authored-by: command-bot <>
…paritytech#6080) A follow-up to paritytech#5599. Assets in a pool with the native one are returned from `query_acceptable_payment_assets`. Now those assets can be used in `query_weight_to_asset_fee` to get the correct amount that needs to be paid. --------- Co-authored-by: command-bot <>
…#6080) A follow-up to #5599. Assets in a pool with the native one are returned from `query_acceptable_payment_assets`. Now those assets can be used in `query_weight_to_asset_fee` to get the correct amount that needs to be paid. --------- Co-authored-by: command-bot <> (cherry picked from commit b4732ad)
…#6080) A follow-up to #5599. Assets in a pool with the native one are returned from `query_acceptable_payment_assets`. Now those assets can be used in `query_weight_to_asset_fee` to get the correct amount that needs to be paid. --------- Co-authored-by: command-bot <> (cherry picked from commit b4732ad)
Backport #6080 into `stable2409` from franciscoaguirre. See the [documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md) on how to use this bot. <!-- # To be used by other automation, do not modify: original-pr-number: #${pull_number} --> --------- Co-authored-by: Francisco Aguirre <[email protected]> Co-authored-by: Egor_P <[email protected]>
A follow-up to #5599. Assets in a pool with the native one are returned from
query_acceptable_payment_assets
. Now those assets can be used inquery_weight_to_asset_fee
to get the correct amount that needs to be paid.