paritytech / txwrapper-core

Tools for FRAME chain builders to publish chain specific offline transaction generation libraries.
https://paritytech.github.io/txwrapper-core/
Apache License 2.0
77 stars 28 forks source link

Bug with submitting a TX to Kusama asset hub that is paying native tokens #393

Closed mezrin closed 4 weeks ago

mezrin commented 2 months ago

We have the example that submits TX to Kusama asset hub. Transaction is paying fungible token as a fee.

If we try to submit a transaction that pays native tokens as a fee - it's rejected by node. Steps to reproduce:


it's easy to fix. if you inspect the object unsigned - you see that the field unsigned.assetId is initialised with the value 0. Even if the line 111 is commented out. And this affects how the transaction is built.

So as quick fix - add the following code to the line 128: delete unsigned.assetId;. And run the script. TX will be submitted and processed successfully.

Need to fix initialisation of the objects. If assetId is not provided - it shall be null.