@ledgerhq/live-common 21.16.3 → 21.17.2
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/lib/families/bitcoin/wallet-btc/crypto/zen.d.ts +2 -1
- package/lib/families/bitcoin/wallet-btc/crypto/zen.d.ts.map +1 -1
- package/lib/families/bitcoin/wallet-btc/crypto/zen.js +4 -2
- package/lib/families/bitcoin/wallet-btc/crypto/zen.js.map +1 -1
- package/package.json +7 -7
- package/src/__tests__/__snapshots__/all.libcore.ts.snap +7 -7
- package/src/currencies/__snapshots__/sortByMarketcap.test.ts.snap +65 -1324
- package/src/families/bitcoin/wallet-btc/crypto/zen.ts +7 -2
|
@@ -84,11 +84,16 @@ class Zen implements ICrypto {
|
|
|
84
84
|
if (!this.validateAddress(address)) {
|
|
85
85
|
throw new InvalidAddress();
|
|
86
86
|
}
|
|
87
|
-
|
|
88
|
-
return toOutputScript(
|
|
87
|
+
const outputScript = toOutputScript(
|
|
89
88
|
Zen.toBitcoinAddr(address),
|
|
90
89
|
coininfo.bitcoin.main.toBitcoinJS()
|
|
91
90
|
);
|
|
91
|
+
// refer to https://github.com/LedgerHQ/lib-ledger-core/blob/fc9d762b83fc2b269d072b662065747a64ab2816/core/src/wallet/bitcoin/scripts/BitcoinLikeScript.cpp#L139 and https://github.com/LedgerHQ/lib-ledger-core/blob/fc9d762b83fc2b269d072b662065747a64ab2816/core/src/wallet/bitcoin/networks.cpp#L39 for bip115 Script and its network parameters
|
|
92
|
+
const bip115Script = Buffer.from(
|
|
93
|
+
"209ec9845acb02fab24e1c0368b3b517c1a4488fba97f0e3459ac053ea0100000003c01f02b4",
|
|
94
|
+
"hex"
|
|
95
|
+
);
|
|
96
|
+
return Buffer.concat([outputScript, bip115Script]);
|
|
92
97
|
}
|
|
93
98
|
|
|
94
99
|
// eslint-disable-next-line class-methods-use-this
|