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.
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 fieldunsigned.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.