Currently the decode function will return a method field for each case including decodeUnsignedTx, decodeSignedTx, and decodeSigningPayload. The method will be of type TxMethod, but it would be nice to have an option within OptionsWithMeta called decodeMethodToHex which allows the method to be returned as a hex value.
In order to have this work, within each decode method used in decode you would need a conditional to check whether the option exists and/or is true, then after:
const methodCall = registry.createType('Call', tx.method);
You would return method as something like:
const method = methodCall.toHex();
This would take a bit of type refactoring, as the TxMethod type would need to be adjusted and will have residual affects across the core code base.
Currently the
decodefunction will return amethodfield for each case includingdecodeUnsignedTx,decodeSignedTx, anddecodeSigningPayload. Themethodwill be of typeTxMethod, but it would be nice to have an option withinOptionsWithMetacalleddecodeMethodToHexwhich allows the method to be returned as a hex value.In order to have this work, within each decode method used in
decodeyou would need a conditional to check whether the option exists and/or is true, then after:You would return method as something like:
This would take a bit of type refactoring, as the
TxMethodtype would need to be adjusted and will have residual affects across the core code base.