Skip to content

Commit

Permalink
fix: allow 0-length memos (to burn dust)
Browse files Browse the repository at this point in the history
  • Loading branch information
coolaj86 committed Apr 27, 2024
1 parent 72858a7 commit e0e7a60
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dashtx.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit e0e7a60

Please sign in to comment.