From 36a3d24b51f8d32f70197fc3567436e73add735d Mon Sep 17 00:00:00 2001 From: Smrecz Date: Wed, 30 Oct 2024 16:09:05 +0100 Subject: [PATCH] UTXO signing secret deduplication adjustments --- package.json | 2 +- packages/blockchain/doge/src/lib/doge.sdk.tx.ts | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index f2c02ceab..b09462e34 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tatumio", - "version": "2.2.86", + "version": "2.2.87", "license": "MIT", "repository": "https://github.com/tatumio/tatum-js", "scripts": { diff --git a/packages/blockchain/doge/src/lib/doge.sdk.tx.ts b/packages/blockchain/doge/src/lib/doge.sdk.tx.ts index 6257674f6..1c0bb7e63 100644 --- a/packages/blockchain/doge/src/lib/doge.sdk.tx.ts +++ b/packages/blockchain/doge/src/lib/doge.sdk.tx.ts @@ -51,7 +51,7 @@ export const dogeTransactions = ( transaction.to(item.address, amount) } - const privateKeysToSign = [] + const privateKeysToSign = new Set() if ('fromUTXO' in body) { for (const item of body.fromUTXO) { const satoshis = amountUtils.toSatoshis(item.value) @@ -64,8 +64,8 @@ export const dogeTransactions = ( satoshis, }), ]) - if ('signatureId' in item) privateKeysToSign.push(item.signatureId) - else if ('privateKey' in item) privateKeysToSign.push(item.privateKey) + if ('signatureId' in item) privateKeysToSign.add(item.signatureId) + else if ('privateKey' in item) privateKeysToSign.add(item.privateKey) } } else if ('fromAddress' in body) { for (const item of body.fromAddress) { @@ -89,8 +89,8 @@ export const dogeTransactions = ( }), ]) - if ('signatureId' in item) privateKeysToSign.push(item.signatureId) - else if ('privateKey' in item) privateKeysToSign.push(item.privateKey) + if ('signatureId' in item) privateKeysToSign.add(item.signatureId) + else if ('privateKey' in item) privateKeysToSign.add(item.privateKey) } } }