Skip to content

Commit

Permalink
Use two bytes for memo length prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
keppel committed Oct 30, 2024
1 parent 5efae40 commit cce30ba
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,9 @@ function encodeIbc(dest: IbcDest) {
let timeout = Buffer.alloc(8)
timeout.writeBigUInt64BE(dest.timeoutTimestamp, 0)
buf = Buffer.concat([buf, timeout])
buf = Buffer.concat([buf, Buffer.from([dest.memo.length])])
let memoLen = Buffer.alloc(2)
memoLen.writeUInt16BE(dest.memo.length)
buf = Buffer.concat([buf, memoLen])
buf = Buffer.concat([buf, Buffer.from(dest.memo)])

return buf
Expand Down

0 comments on commit cce30ba

Please sign in to comment.