Closed wuzhong-papermoon closed 4 months ago
I have seen this before, I think it's because the ordering of your assets are incorrect. Try switching the order of your assets and see if that works.
We have written something similar in the asset-trasnfer-api that ensures ordering is correct of assets: https://github.com/paritytech/asset-transfer-api/blob/main/src/createXcmTypes/util/sortAssetsAscending.ts
Hey @TarikGul - This is still an issue/bug that should be looked into, right?
Thanks in advance
Well it depends on if what I suggested above is the issue. If im correct than no its not a bug. Unfortunately it's not a helpful error from the chain, but this api is just acting as a mirror and giving whatever error the chain would.
Yeah, I remember this happening some time ago in which the order of the assets was crucial to avoid errors. This is in AssetHub.
I don't really understand the origin of the issue, but why would the order matter when calling the extrinsic? So the issue is actually within the pallet I guess?
Probably related to https://github.com/paritytech/polkadot-sdk/issues/3661 or https://github.com/paritytech/polkadot-sdk/issues/2123
I don't really understand the origin of the issue, but why would the order matter when calling the extrinsic? So the issue is actually within the pallet I guess?
Yea exactly the issue is within the pallet, i'll find the exact code and link it here in a second.
So this is part of it, and as you look further into the implementation, you'll find how the ordering works exactly.
Ok I mean this is kind of weird from a DX perspective, but I understand now it is not an issue with the API - Feel free to close this issue as the problem lies in the pallet
Awesome, closing as resolved.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue if you think you have a related problem or query.
I'm submitting a ...
What is the current behavior and expected behavior?
I'm reaching out to report an unusual behavior encountered while using the paymentInfo API for XCM transfers. We're attempting to send an XCM transfer for multiple tokens, but we're receiving the following error:
Below is a sample code for your reference, SDK version is the latest:
The weird thing is if assets array contains only one item, for example:
The code works fine. Would you take a look at this issue please? Thanks!
Version: 11.3.1
Environment:
Language: