Skip to content

Commit

Permalink
fix(TXBuilder): Fix payload serialization if you try to pack unpacked…
Browse files Browse the repository at this point in the history
… tx. (#498)
  • Loading branch information
nduchak committed Jun 21, 2019
1 parent 053faae commit 73552e5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions es/tx/builder/index.js
Expand Up @@ -98,6 +98,9 @@ function serializeField (value, type, prefix) {
case FIELD_TYPES.signatures:
return value.map(Buffer.from)
case FIELD_TYPES.payload:
return typeof value === 'string' && value.split('_')[0] === 'ba'
? decode(value, 'ba')
: toBytes(value)
case FIELD_TYPES.string:
return toBytes(value)
case FIELD_TYPES.pointers:
Expand Down

0 comments on commit 73552e5

Please sign in to comment.