@exodus/bitcoin-plugin 1.16.3 → 1.16.4
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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exodus/bitcoin-plugin",
|
|
3
|
-
"version": "1.16.
|
|
3
|
+
"version": "1.16.4",
|
|
4
4
|
"description": "Exodus bitcoin-plugin",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"files": [
|
|
@@ -49,5 +49,5 @@
|
|
|
49
49
|
"@scure/btc-signer": "^1.1.0",
|
|
50
50
|
"jest-when": "^3.5.1"
|
|
51
51
|
},
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "b78e98b2a63dfce6b64b45869cba86fb36022a5e"
|
|
53
53
|
}
|
package/src/create-asset.js
CHANGED
|
@@ -4,7 +4,7 @@ import { Psbt } from '@exodus/bitcoinjs-lib'
|
|
|
4
4
|
import assert from 'minimalistic-assert'
|
|
5
5
|
|
|
6
6
|
// This function accepts either a list of transactions created by a wallet (unsignedTxs) or a web3 transaction (transactionBuffers).
|
|
7
|
-
export const createSimulateTransactions = ({ prepareForSigning }) => {
|
|
7
|
+
export const createSimulateTransactions = ({ asset, prepareForSigning }) => {
|
|
8
8
|
assert('prepareForSigning', '"prepareForSigning" should be passed')
|
|
9
9
|
|
|
10
10
|
return function simulateTransaction({ transactionBuffers, unsignedTxs, ...restParameters }) {
|
|
@@ -29,7 +29,7 @@ export const createSimulateTransactions = ({ prepareForSigning }) => {
|
|
|
29
29
|
assert(unsignedTxs.length === 1, 'Simulation for multiple transactions is not supported.')
|
|
30
30
|
|
|
31
31
|
const unsignedTx = unsignedTxs[0]
|
|
32
|
-
const psbtBase64 = prepareForSigning(unsignedTx).toBase64()
|
|
32
|
+
const psbtBase64 = prepareForSigning({ unsignedTx }).toBase64()
|
|
33
33
|
const walletAddresses = Object.keys(unsignedTx.txMeta.addressPathsMap).reduce(
|
|
34
34
|
(acc, current) => {
|
|
35
35
|
acc[current] = true
|
|
@@ -49,6 +49,7 @@ export const createSimulateTransactions = ({ prepareForSigning }) => {
|
|
|
49
49
|
}, {})
|
|
50
50
|
|
|
51
51
|
return simulateTransactions({
|
|
52
|
+
asset,
|
|
52
53
|
transactions: [psbtBase64],
|
|
53
54
|
walletAddresses,
|
|
54
55
|
indexToAddressRecord,
|