Skip to content

Commit

Permalink
UTXO signing secret deduplication adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
Smrecz committed Oct 30, 2024
1 parent 568970f commit 36a3d24
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tatumio",
"version": "2.2.86",
"version": "2.2.87",
"license": "MIT",
"repository": "https://github.com/tatumio/tatum-js",
"scripts": {
Expand Down
10 changes: 5 additions & 5 deletions packages/blockchain/doge/src/lib/doge.sdk.tx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export const dogeTransactions = (
transaction.to(item.address, amount)
}

const privateKeysToSign = []
const privateKeysToSign = new Set<string>()
if ('fromUTXO' in body) {
for (const item of body.fromUTXO) {
const satoshis = amountUtils.toSatoshis(item.value)
Expand All @@ -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) {
Expand All @@ -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)
}
}
}
Expand Down

0 comments on commit 36a3d24

Please sign in to comment.