@exodus/bitcoin-api 2.6.6 → 2.6.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/src/tx-send/index.js +5 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exodus/bitcoin-api",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.7",
|
|
4
4
|
"description": "Exodus bitcoin-api",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"files": [
|
|
@@ -43,5 +43,5 @@
|
|
|
43
43
|
"@scure/btc-signer": "^1.1.0",
|
|
44
44
|
"jest-when": "^3.5.1"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "04954f04a1246db5d0cc3fd848ef23a91df2b623"
|
|
47
47
|
}
|
package/src/tx-send/index.js
CHANGED
|
@@ -293,6 +293,7 @@ export const createAndBroadcastTXFactory = ({
|
|
|
293
293
|
UtxoCollection.fromJSON(replaceTx.data.inputs, { currency: asset.currency })
|
|
294
294
|
)
|
|
295
295
|
}
|
|
296
|
+
const addressPathsMap = selectedUtxos.getAddressPathsMap()
|
|
296
297
|
|
|
297
298
|
// transform UTXO object to raw
|
|
298
299
|
const inputs = shuffle(createInputs(assetName, selectedUtxos.toArray(), rbfEnabled))
|
|
@@ -341,6 +342,9 @@ export const createAndBroadcastTXFactory = ({
|
|
|
341
342
|
ourAddress.address ? ourAddress.address : ourAddress.toString(),
|
|
342
343
|
change
|
|
343
344
|
)
|
|
345
|
+
// Add the keypath of change address to support Trezor detect the change output.
|
|
346
|
+
// Output is change and does not need approval from user which shows the strange address that user never seen.
|
|
347
|
+
addressPathsMap[changeAddress] = ourAddress.meta.path
|
|
344
348
|
outputs.push(changeOutput)
|
|
345
349
|
} else {
|
|
346
350
|
// If we don't have enough for a change output, then all remaining dust is just added to fee
|
|
@@ -360,7 +364,7 @@ export const createAndBroadcastTXFactory = ({
|
|
|
360
364
|
},
|
|
361
365
|
txMeta: {
|
|
362
366
|
useCashAddress, // for trezor to show the receiver cash address
|
|
363
|
-
addressPathsMap
|
|
367
|
+
addressPathsMap,
|
|
364
368
|
blockHeight,
|
|
365
369
|
},
|
|
366
370
|
}
|