Browse Source

Merge pull request #1731 from KhalilBellakrid/develop

Support for XSN and activate Sapling for Komodo, fix fees (negative or high one)
gre-patch-1
Gaëtan Renaudeau 6 years ago
committed by GitHub
parent
commit
8be2bed1a6
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      package.json
  2. 4
      src/commands/libcoreSignAndBroadcast.js
  3. 1
      src/config/cryptocurrencies.js
  4. 16
      yarn.lock

4
package.json

@ -35,12 +35,12 @@
} }
}, },
"dependencies": { "dependencies": {
"@ledgerhq/hw-app-btc": "^4.32.0", "@ledgerhq/hw-app-btc": "^4.34.0",
"@ledgerhq/hw-app-eth": "^4.32.0", "@ledgerhq/hw-app-eth": "^4.32.0",
"@ledgerhq/hw-app-xrp": "^4.32.0", "@ledgerhq/hw-app-xrp": "^4.32.0",
"@ledgerhq/hw-transport": "^4.32.0", "@ledgerhq/hw-transport": "^4.32.0",
"@ledgerhq/hw-transport-node-hid": "^4.32.0", "@ledgerhq/hw-transport-node-hid": "^4.32.0",
"@ledgerhq/ledger-core": "2.0.0-rc.14", "@ledgerhq/ledger-core": "2.0.0-rc.16",
"@ledgerhq/live-common": "4.13.0", "@ledgerhq/live-common": "4.13.0",
"animated": "^0.2.2", "animated": "^0.2.2",
"async": "^2.6.1", "async": "^2.6.1",

4
src/commands/libcoreSignAndBroadcast.js

@ -110,7 +110,7 @@ async function signTransaction({
const additionals = [] const additionals = []
let expiryHeight let expiryHeight
if (currency.id === 'bitcoin_cash' || currency.id === 'bitcoin_gold') additionals.push('bip143') if (currency.id === 'bitcoin_cash' || currency.id === 'bitcoin_gold') additionals.push('bip143')
if (currency.id === 'zcash') { if (currency.id === 'zcash' || currency.id === 'komodo') {
expiryHeight = Buffer.from([0x00, 0x00, 0x00, 0x00]) expiryHeight = Buffer.from([0x00, 0x00, 0x00, 0x00])
if (blockHeight >= 419200) { if (blockHeight >= 419200) {
additionals.push('sapling') additionals.push('sapling')
@ -121,7 +121,7 @@ async function signTransaction({
} }
const rawInputs = transaction.getInputs() const rawInputs = transaction.getInputs()
const hasExtraData = currency.id === 'zcash' const hasExtraData = currency.id === 'zcash' || currency.id === 'komodo'
const inputs = await Promise.all( const inputs = await Promise.all(
rawInputs.map(async input => { rawInputs.map(async input => {

1
src/config/cryptocurrencies.js

@ -24,6 +24,7 @@ const supported: CryptoCurrencyIds[] = [
'vertcoin', 'vertcoin',
'peercoin', 'peercoin',
'viacoin', 'viacoin',
'stakenet',
'stealthcoin', 'stealthcoin',
'poswallet', 'poswallet',
'clubcoin', 'clubcoin',

16
yarn.lock

@ -1690,6 +1690,14 @@
"@ledgerhq/hw-transport" "^4.32.0" "@ledgerhq/hw-transport" "^4.32.0"
create-hash "^1.1.3" create-hash "^1.1.3"
"@ledgerhq/hw-app-btc@^4.34.0":
version "4.34.0"
resolved "https://registry.yarnpkg.com/@ledgerhq/hw-app-btc/-/hw-app-btc-4.34.0.tgz#0bbc46afd29de04ac6a73582fbf9a09fcf5ed117"
integrity sha512-xR4rH8o8YRvyhnTvb8g89NAJQQqXJkApiFtCvduBamu5V+rDvhHYlFu2B+CU6g8lzLFACMDIqJqXbmwT80AGjw==
dependencies:
"@ledgerhq/hw-transport" "^4.32.0"
create-hash "^1.1.3"
"@ledgerhq/hw-app-eth@^4.32.0": "@ledgerhq/hw-app-eth@^4.32.0":
version "4.32.0" version "4.32.0"
resolved "https://registry.yarnpkg.com/@ledgerhq/hw-app-eth/-/hw-app-eth-4.32.0.tgz#7d43ca2c7952f1fb726e02c3b4485be10af481a2" resolved "https://registry.yarnpkg.com/@ledgerhq/hw-app-eth/-/hw-app-eth-4.32.0.tgz#7d43ca2c7952f1fb726e02c3b4485be10af481a2"
@ -1722,10 +1730,10 @@
dependencies: dependencies:
events "^3.0.0" events "^3.0.0"
"@ledgerhq/ledger-core@2.0.0-rc.14": "@ledgerhq/ledger-core@2.0.0-rc.16":
version "2.0.0-rc.14" version "2.0.0-rc.16"
resolved "https://registry.yarnpkg.com/@ledgerhq/ledger-core/-/ledger-core-2.0.0-rc.14.tgz#538b771e9d837ce1d26aabaa1dfe58a6b882e3cd" resolved "https://registry.yarnpkg.com/@ledgerhq/ledger-core/-/ledger-core-2.0.0-rc.16.tgz#51f141c0143edb020e38855bf2e2619e3446e74f"
integrity sha512-WIq6DyOoqtPPt+pS8K6NQ8EJD9GIn/VD1HLehWvJYqZhUf1IOIEIaOqxCnayHMQ/7b4c68xANgmKggUBdQ0M+A== integrity sha512-gmbeXRBg4NSqzH6+EajYTzaQlwN5ugaN1nH0SI6BvRqMfcorxNRE8byfh3F2u+7TNchBW72vOZnKPDShaR9/pQ==
dependencies: dependencies:
bindings "^1.3.0" bindings "^1.3.0"
nan "^2.6.2" nan "^2.6.2"

Loading…
Cancel
Save