Open molekilla opened 5 years ago
@molekilla ~You must be using latest connex release v1.3.1.~ In practical, type string? is more suitable for Clause.data, and i think it's the rare case to encode a tx in connex environment.
The workaround:
// assume type of `clauses` is Connex.Thor.Clause[]
const converted = clauses.map(c => ({to: c.to, value: c.value, data: c.data || '0x'}))
Hi I'm getting this with Typescript
data needs to be optional in thor-devkit
Thanks Rogelio