From e0e7a60756ca258a7a2e9ea9fd001b3139529388 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Fri, 19 Apr 2024 22:47:06 -0600 Subject: [PATCH] fix: allow 0-length memos (to burn dust) --- dashtx.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dashtx.js b/dashtx.js index e3bafe5..79db5ca 100644 --- a/dashtx.js +++ b/dashtx.js @@ -194,12 +194,12 @@ var DashTx = ("object" === typeof module && exports) || {}; let size = 0; for (let output of outputs) { - if (output.message) { + if ("string" === typeof output.message) { if (!output.memo) { output.memo = TxUtils.strToHex(output.message); } } - if (output.memo) { + if ("string" === typeof output.memo) { let memoSize = output.memo.length / 2; if (memoSize > MAX_U8) { size += 2;