diff --git a/app/components/Contacts/Network/Network.js b/app/components/Contacts/Network/Network.js index 058e211fffd..66b06fc2190 100644 --- a/app/components/Contacts/Network/Network.js +++ b/app/components/Contacts/Network/Network.js @@ -74,7 +74,7 @@ class Network extends Component { changeFilter, setSelectedChannel, closeChannel, - network, + networkInfo, currencyName, intl } = this.props @@ -305,7 +305,7 @@ class Network extends Component { py={0} onClick={() => blockExplorer.showTransaction( - network, + networkInfo, channelObj.closing_txid || channel.channel_point.split(':')[0] ) } @@ -439,7 +439,10 @@ Network.propTypes = { channelBalance: PropTypes.number, currentTicker: PropTypes.object, ticker: PropTypes.object.isRequired, - network: PropTypes.object.isRequired, + networkInfo: PropTypes.shape({ + id: PropTypes.string, + name: PropTypes.string + }), fetchChannels: PropTypes.func.isRequired, openContactsForm: PropTypes.func.isRequired, changeFilter: PropTypes.func.isRequired, diff --git a/app/components/Wallet/ReceiveModal/ReceiveModal.js b/app/components/Wallet/ReceiveModal/ReceiveModal.js index a7ade0562c4..44214854514 100644 --- a/app/components/Wallet/ReceiveModal/ReceiveModal.js +++ b/app/components/Wallet/ReceiveModal/ReceiveModal.js @@ -42,7 +42,7 @@ class ReceiveModal extends React.Component { alias, closeReceiveModal, cryptoName, - network, + networkInfo, intl } = this.props const { qrCodeType } = this.state @@ -137,7 +137,7 @@ class ReceiveModal extends React.Component { {' '} - {network && network.name.toLowerCase() === 'testnet' && network.name} + {networkInfo && networkInfo.id === 'testnet' && networkInfo.name} - {info.data.testnet && ( + {networkInfo.id !== 'mainnet' && ( - Testnet + {networkInfo.name} )} @@ -92,7 +92,10 @@ Wallet.propTypes = { totalBalance: PropTypes.number, currencyFilters: PropTypes.array.isRequired, currentTicker: PropTypes.object, - info: PropTypes.object.isRequired, + networkInfo: PropTypes.shape({ + id: PropTypes.string, + name: PropTypes.string + }), ticker: PropTypes.object.isRequired, // Dispatch props diff --git a/app/containers/Activity/TransactionModalContainer.js b/app/containers/Activity/TransactionModalContainer.js index a8c04fae465..299a4d6d2a1 100644 --- a/app/containers/Activity/TransactionModalContainer.js +++ b/app/containers/Activity/TransactionModalContainer.js @@ -1,5 +1,6 @@ import { connect } from 'react-redux' import { setCurrency, setFiatTicker, tickerSelectors } from 'reducers/ticker' +import { infoSelectors } from 'reducers/info' import { TransactionModal } from 'components/Activity/TransactionModal' const mapStateToProps = state => ({ @@ -8,7 +9,7 @@ const mapStateToProps = state => ({ cryptoCurrencies: tickerSelectors.currencyFilters(state), fiatCurrencies: state.ticker.fiatTickers, fiatCurrency: state.ticker.fiatTicker, - network: state.info.network + network: infoSelectors.networkInfo(state) }) const mapDispatchToProps = { diff --git a/app/containers/App.js b/app/containers/App.js index 0c162776318..04bd9c52535 100644 --- a/app/containers/App.js +++ b/app/containers/App.js @@ -5,6 +5,7 @@ import { setCurrency, tickerSelectors } from 'reducers/ticker' import { closeWalletModal } from 'reducers/address' import { setFormType } from 'reducers/form' import { createInvoice, fetchInvoice } from 'reducers/invoice' +import { infoSelectors } from 'reducers/info' import { lndSelectors } from 'reducers/lnd' import { fetchChannels, @@ -99,6 +100,7 @@ const mapStateToProps = state => ({ filteredNetworkNodes: contactFormSelectors.filteredNetworkNodes(state), showManualForm: contactFormSelectors.showManualForm(state), + networkInfo: infoSelectors.networkInfo(state), currentChannels: currentChannels(state), activeChannelPubkeys: channelsSelectors.activeChannelPubkeys(state), nonActiveChannelPubkeys: channelsSelectors.nonActiveChannelPubkeys(state), @@ -122,7 +124,7 @@ const mergeProps = (stateProps, dispatchProps, ownProps) => { contactsform: stateProps.contactsform, nodes: stateProps.network.nodes, ticker: stateProps.ticker, - network: stateProps.info.network, + networkInfo: stateProps.networkInfo, currencyName: stateProps.currencyName, fetchChannels: dispatchProps.fetchChannels, @@ -153,7 +155,7 @@ const mergeProps = (stateProps, dispatchProps, ownProps) => { const receiveModalProps = { isOpen: stateProps.address.walletModal, - network: stateProps.info.network, + networkInfo: stateProps.networkInfo, cryptoName: stateProps.cryptoName, pubkey: get(stateProps.info, 'data.uris[0]') || get(stateProps.info, 'data.identity_pubkey'), address: stateProps.address.address, diff --git a/app/containers/Pay.js b/app/containers/Pay.js index 8857cfa10f8..15b83181cbe 100644 --- a/app/containers/Pay.js +++ b/app/containers/Pay.js @@ -2,13 +2,12 @@ import { connect } from 'react-redux' import { Pay } from 'components/Pay' import { tickerSelectors, setCurrency, setFiatTicker } from 'reducers/ticker' import { setPayReq, queryFees, queryRoutes } from 'reducers/pay' -import { infoSelectors } from 'reducers/info' import { sendCoins } from 'reducers/transaction' import { payInvoice } from 'reducers/payment' const mapStateToProps = state => ({ chain: state.info.chain, - network: infoSelectors.testnetSelector(state) ? 'testnet' : 'mainnet', + network: state.info.network, cryptoName: tickerSelectors.cryptoName(state), channelBalance: state.balance.channelBalance, currentTicker: tickerSelectors.currentTicker(state), diff --git a/app/containers/Wallet.js b/app/containers/Wallet.js index 330919edc53..35528e700d4 100644 --- a/app/containers/Wallet.js +++ b/app/containers/Wallet.js @@ -3,6 +3,7 @@ import { setCurrency, tickerSelectors } from 'reducers/ticker' import { openWalletModal } from 'reducers/address' import { setFormType } from 'reducers/form' import { balanceSelectors } from 'reducers/balance' +import { infoSelectors } from 'reducers/info' import Wallet from 'components/Wallet' const mapDispatchToProps = { @@ -12,7 +13,7 @@ const mapDispatchToProps = { } const mapStateToProps = state => ({ - info: state.info, + networkInfo: infoSelectors.networkInfo(state), ticker: state.ticker, totalBalance: balanceSelectors.totalBalance(state), currentTicker: tickerSelectors.currentTicker(state), diff --git a/app/reducers/contactsform.js b/app/reducers/contactsform.js index b843f2dfbb0..555ef1c429c 100644 --- a/app/reducers/contactsform.js +++ b/app/reducers/contactsform.js @@ -141,7 +141,7 @@ const nodeSelector = state => state.contactsform.node const channelsSelector = state => state.channels.channels const peersSelector = state => state.peers.peers const contactable = node => node.addresses.length > 0 -const testnetSelector = state => state.info.data.testnet +const networkSelector = state => state.info.network const testnetNodesSelector = state => state.channels.suggestedNodes.testnet const mainnetNodesSelector = state => state.channels.suggestedNodes.mainnet @@ -156,11 +156,11 @@ const contactableFirst = (a, b) => { } contactFormSelectors.suggestedNodes = createSelector( - testnetSelector, + networkSelector, testnetNodesSelector, mainnetNodesSelector, - (testnet, testnetNodes, mainnetNodes) => { - return testnet ? testnetNodes : mainnetNodes + (network, testnetNodes, mainnetNodes) => { + return network === 'testnet' ? testnetNodes : mainnetNodes } ) diff --git a/app/reducers/info.js b/app/reducers/info.js index a6b5212f1cc..2eece5b42a5 100644 --- a/app/reducers/info.js +++ b/app/reducers/info.js @@ -1,3 +1,4 @@ +import { createSelector } from 'reselect' import { send } from 'redux-electron-ipc' import get from 'lodash.get' import db from 'store/db' @@ -87,7 +88,7 @@ export const receiveInfo = (event, data) => async (dispatch, getState) => { // Update the active wallet settings with info discovered from getinfo. const chain = get(state, 'info.chain') - const network = get(state, 'info.network.id') + const network = get(state, 'info.network') const wallet = walletSelectors.activeWalletSettings(state) if (wallet && (wallet.chain !== chain || wallet.network !== network)) { @@ -109,12 +110,11 @@ const ACTION_HANDLERS = { [RECEIVE_INFO]: (state, { data }) => { const chain = get(data, 'chains[0].chain') const network = get(data, 'chains[0].network') - const networkData = get(networkInfo, `${chain}.${network}`) return { ...state, infoLoading: false, - network: networkData, chain, + network, data } } @@ -126,18 +126,27 @@ const ACTION_HANDLERS = { const initialState = { infoLoading: false, hasSynced: undefined, - network: {}, + chain: null, + network: null, data: {}, - chain: null + networks: networkInfo } // Selectors const infoSelectors = {} -infoSelectors.testnetSelector = state => state.info.data.testnet +infoSelectors.chainSelector = state => state.info.chain infoSelectors.networkSelector = state => state.info.network +infoSelectors.networksSelector = state => state.info.networks infoSelectors.infoLoading = state => state.info.infoLoading infoSelectors.hasSynced = state => state.info.hasSynced +infoSelectors.networkInfo = createSelector( + infoSelectors.chainSelector, + infoSelectors.networkSelector, + infoSelectors.networksSelector, + (chain, network, networks) => get(networks, `${chain}.${network}`) +) + export { infoSelectors } export default function infoReducer(state = initialState, action) { diff --git a/app/reducers/ticker.js b/app/reducers/ticker.js index adb35c8fbf7..ec30a76bbc2 100644 --- a/app/reducers/ticker.js +++ b/app/reducers/ticker.js @@ -131,15 +131,15 @@ tickerSelectors.cryptoName = createSelector( tickerSelectors.currencyFilters = createSelector( cryptoSelector, - infoSelectors.networkSelector, + infoSelectors.networkInfo, currencyFiltersSelector, - (crypto, network, currencyFilters) => { - if (!crypto || !network) { + (crypto, networkInfo, currencyFilters) => { + if (!crypto || !networkInfo) { return [] } return currencyFilters[crypto].map(item => ({ ...item, - name: `${network.unitPrefix}${item.name}` + name: `${networkInfo.unitPrefix}${item.name}` })) } ) diff --git a/test/unit/reducers/__snapshots__/info.spec.js.snap b/test/unit/reducers/__snapshots__/info.spec.js.snap index b782738e2a6..d40291c1222 100644 --- a/test/unit/reducers/__snapshots__/info.spec.js.snap +++ b/test/unit/reducers/__snapshots__/info.spec.js.snap @@ -6,7 +6,188 @@ Object { "data": Object {}, "hasSynced": undefined, "infoLoading": true, - "network": Object {}, + "network": null, + "networks": Object { + "bitcoin": Object { + "mainnet": Object { + "bitcoinJsNetwork": Object { + "bip32": Object { + "private": 76066276, + "public": 76067358, + }, + "dustThreshold": null, + "hashGenesisBlock": "000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f", + "messagePrefix": "Bitcoin Signed Message: +", + "name": "Bitcoin", + "per1": 100000000, + "port": 8333, + "portRpc": 8332, + "protocol": Object { + "magic": 3652501241, + }, + "pubKeyHash": 0, + "scriptHash": 5, + "seedsDns": Array [ + "seed.bitcoin.sipa.be", + "dnsseed.bluematt.me", + "dnsseed.bitcoin.dashjr.org", + "seed.bitcoinstats.com", + "bitseed.xf2.org", + "seed.bitcoin.jonasschnelli.ch", + ], + "testnet": false, + "toBitcoinJS": [Function], + "toBitcore": [Function], + "unit": "BTC", + "versions": Object { + "bip32": Object { + "private": 76066276, + "public": 76067358, + }, + "bip44": 0, + "private": 128, + "public": 0, + "scripthash": 5, + }, + "wif": 128, + }, + "explorerUrl": "https://blockstream.info", + "id": "mainnet", + "name": "Mainnet", + "unitPrefix": "", + }, + "testnet": Object { + "bitcoinJsNetwork": Object { + "bip32": Object { + "private": 70615956, + "public": 70617039, + }, + "dustThreshold": null, + "hashGenesisBlock": "000000000933ea01ad0ee984209779baaec3ced90fa3f408719526f8d77f4943", + "messagePrefix": "Bitcoin Signed Message: +", + "name": "Bitcoin", + "per1": 100000000, + "port": 18333, + "portRpc": 18332, + "protocol": Object { + "magic": 118034699, + }, + "pubKeyHash": 111, + "scriptHash": 196, + "seedsDns": Array [ + "testnet-seed.alexykot.me", + "testnet-seed.bitcoin.schildbach.de", + "testnet-seed.bitcoin.petertodd.org", + "testnet-seed.bluematt.me", + ], + "testnet": true, + "toBitcoinJS": [Function], + "toBitcore": [Function], + "unit": "BTC", + "versions": Object { + "bip32": Object { + "private": 70615956, + "public": 70617039, + }, + "bip44": 1, + "private": 239, + "public": 111, + "scripthash": 196, + }, + "wif": 239, + }, + "explorerUrl": "https://blockstream.info/testnet", + "id": "testnet", + "name": "Testnet", + "unitPrefix": "t", + }, + }, + "litecoin": Object { + "mainnet": Object { + "bitcoinJsNetwork": Object { + "bip32": Object { + "private": 27106558, + "public": 27108450, + }, + "dustThreshold": null, + "hashGenesisBlock": "12a765e31ffd4059bada1e25190f6e98c99d9714d334efa41a195a7e7e04bfe2", + "messagePrefix": "Litecoin Signed Message: +", + "name": "Litecoin", + "port": 9333, + "protocol": Object { + "magic": 3686187259, + }, + "pubKeyHash": 48, + "scriptHash": 50, + "seedsDns": Array [ + "dnsseed.litecointools.com", + "dnsseed.litecoinpool.org", + "dnsseed.ltc.xurious.com", + "dnsseed.koin-project.com", + "dnsseed.weminemnc.com", + ], + "testnet": false, + "toBitcoinJS": [Function], + "toBitcore": [Function], + "unit": "LTC", + "versions": Object { + "bip32": Object { + "private": 27106558, + "public": 27108450, + }, + "bip44": 2, + "private": 176, + "public": 48, + "scripthash": 50, + "scripthash2": 5, + }, + "wif": 176, + }, + "explorerUrl": "https://insight.litecore.io", + "id": "mainnet", + "name": "Mainnet", + "unitPrefix": "", + }, + "testnet": Object { + "bitcoinJsNetwork": Object { + "bip32": Object { + "private": 70709117, + "public": 70711009, + }, + "dustThreshold": null, + "hashGenesisBlock": "f5ae71e26c74beacc88382716aced69cddf3dffff24f384e1808905e0188f68f", + "messagePrefix": "Litecoin Signed Message: +", + "name": "Litecoin", + "pubKeyHash": 111, + "scriptHash": 58, + "testnet": true, + "toBitcoinJS": [Function], + "toBitcore": [Function], + "unit": "LTC", + "versions": Object { + "bip32": Object { + "private": 70709117, + "public": 70711009, + }, + "bip44": 1, + "private": 239, + "public": 111, + "scripthash": 58, + "scripthash2": 196, + }, + "wif": 239, + }, + "explorerUrl": "https://testnet.litecore.io", + "id": "testnet", + "name": "Testnet", + "unitPrefix": "t", + }, + }, + }, } `; @@ -24,53 +205,187 @@ Object { }, "hasSynced": undefined, "infoLoading": false, - "network": Object { - "bitcoinJsNetwork": Object { - "bip32": Object { - "private": 76066276, - "public": 76067358, + "network": "mainnet", + "networks": Object { + "bitcoin": Object { + "mainnet": Object { + "bitcoinJsNetwork": Object { + "bip32": Object { + "private": 76066276, + "public": 76067358, + }, + "dustThreshold": null, + "hashGenesisBlock": "000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f", + "messagePrefix": "Bitcoin Signed Message: +", + "name": "Bitcoin", + "per1": 100000000, + "port": 8333, + "portRpc": 8332, + "protocol": Object { + "magic": 3652501241, + }, + "pubKeyHash": 0, + "scriptHash": 5, + "seedsDns": Array [ + "seed.bitcoin.sipa.be", + "dnsseed.bluematt.me", + "dnsseed.bitcoin.dashjr.org", + "seed.bitcoinstats.com", + "bitseed.xf2.org", + "seed.bitcoin.jonasschnelli.ch", + ], + "testnet": false, + "toBitcoinJS": [Function], + "toBitcore": [Function], + "unit": "BTC", + "versions": Object { + "bip32": Object { + "private": 76066276, + "public": 76067358, + }, + "bip44": 0, + "private": 128, + "public": 0, + "scripthash": 5, + }, + "wif": 128, + }, + "explorerUrl": "https://blockstream.info", + "id": "mainnet", + "name": "Mainnet", + "unitPrefix": "", + }, + "testnet": Object { + "bitcoinJsNetwork": Object { + "bip32": Object { + "private": 70615956, + "public": 70617039, + }, + "dustThreshold": null, + "hashGenesisBlock": "000000000933ea01ad0ee984209779baaec3ced90fa3f408719526f8d77f4943", + "messagePrefix": "Bitcoin Signed Message: +", + "name": "Bitcoin", + "per1": 100000000, + "port": 18333, + "portRpc": 18332, + "protocol": Object { + "magic": 118034699, + }, + "pubKeyHash": 111, + "scriptHash": 196, + "seedsDns": Array [ + "testnet-seed.alexykot.me", + "testnet-seed.bitcoin.schildbach.de", + "testnet-seed.bitcoin.petertodd.org", + "testnet-seed.bluematt.me", + ], + "testnet": true, + "toBitcoinJS": [Function], + "toBitcore": [Function], + "unit": "BTC", + "versions": Object { + "bip32": Object { + "private": 70615956, + "public": 70617039, + }, + "bip44": 1, + "private": 239, + "public": 111, + "scripthash": 196, + }, + "wif": 239, + }, + "explorerUrl": "https://blockstream.info/testnet", + "id": "testnet", + "name": "Testnet", + "unitPrefix": "t", }, - "dustThreshold": null, - "hashGenesisBlock": "000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f", - "messagePrefix": "Bitcoin Signed Message: + }, + "litecoin": Object { + "mainnet": Object { + "bitcoinJsNetwork": Object { + "bip32": Object { + "private": 27106558, + "public": 27108450, + }, + "dustThreshold": null, + "hashGenesisBlock": "12a765e31ffd4059bada1e25190f6e98c99d9714d334efa41a195a7e7e04bfe2", + "messagePrefix": "Litecoin Signed Message: ", - "name": "Bitcoin", - "per1": 100000000, - "port": 8333, - "portRpc": 8332, - "protocol": Object { - "magic": 3652501241, + "name": "Litecoin", + "port": 9333, + "protocol": Object { + "magic": 3686187259, + }, + "pubKeyHash": 48, + "scriptHash": 50, + "seedsDns": Array [ + "dnsseed.litecointools.com", + "dnsseed.litecoinpool.org", + "dnsseed.ltc.xurious.com", + "dnsseed.koin-project.com", + "dnsseed.weminemnc.com", + ], + "testnet": false, + "toBitcoinJS": [Function], + "toBitcore": [Function], + "unit": "LTC", + "versions": Object { + "bip32": Object { + "private": 27106558, + "public": 27108450, + }, + "bip44": 2, + "private": 176, + "public": 48, + "scripthash": 50, + "scripthash2": 5, + }, + "wif": 176, + }, + "explorerUrl": "https://insight.litecore.io", + "id": "mainnet", + "name": "Mainnet", + "unitPrefix": "", }, - "pubKeyHash": 0, - "scriptHash": 5, - "seedsDns": Array [ - "seed.bitcoin.sipa.be", - "dnsseed.bluematt.me", - "dnsseed.bitcoin.dashjr.org", - "seed.bitcoinstats.com", - "bitseed.xf2.org", - "seed.bitcoin.jonasschnelli.ch", - ], - "testnet": false, - "toBitcoinJS": [Function], - "toBitcore": [Function], - "unit": "BTC", - "versions": Object { - "bip32": Object { - "private": 76066276, - "public": 76067358, + "testnet": Object { + "bitcoinJsNetwork": Object { + "bip32": Object { + "private": 70709117, + "public": 70711009, + }, + "dustThreshold": null, + "hashGenesisBlock": "f5ae71e26c74beacc88382716aced69cddf3dffff24f384e1808905e0188f68f", + "messagePrefix": "Litecoin Signed Message: +", + "name": "Litecoin", + "pubKeyHash": 111, + "scriptHash": 58, + "testnet": true, + "toBitcoinJS": [Function], + "toBitcore": [Function], + "unit": "LTC", + "versions": Object { + "bip32": Object { + "private": 70709117, + "public": 70711009, + }, + "bip44": 1, + "private": 239, + "public": 111, + "scripthash": 58, + "scripthash2": 196, + }, + "wif": 239, }, - "bip44": 0, - "private": 128, - "public": 0, - "scripthash": 5, + "explorerUrl": "https://testnet.litecore.io", + "id": "testnet", + "name": "Testnet", + "unitPrefix": "t", }, - "wif": 128, }, - "explorerUrl": "https://blockstream.info", - "id": "mainnet", - "name": "Mainnet", - "unitPrefix": "", }, } `; @@ -81,6 +396,187 @@ Object { "data": Object {}, "hasSynced": undefined, "infoLoading": false, - "network": Object {}, + "network": null, + "networks": Object { + "bitcoin": Object { + "mainnet": Object { + "bitcoinJsNetwork": Object { + "bip32": Object { + "private": 76066276, + "public": 76067358, + }, + "dustThreshold": null, + "hashGenesisBlock": "000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f", + "messagePrefix": "Bitcoin Signed Message: +", + "name": "Bitcoin", + "per1": 100000000, + "port": 8333, + "portRpc": 8332, + "protocol": Object { + "magic": 3652501241, + }, + "pubKeyHash": 0, + "scriptHash": 5, + "seedsDns": Array [ + "seed.bitcoin.sipa.be", + "dnsseed.bluematt.me", + "dnsseed.bitcoin.dashjr.org", + "seed.bitcoinstats.com", + "bitseed.xf2.org", + "seed.bitcoin.jonasschnelli.ch", + ], + "testnet": false, + "toBitcoinJS": [Function], + "toBitcore": [Function], + "unit": "BTC", + "versions": Object { + "bip32": Object { + "private": 76066276, + "public": 76067358, + }, + "bip44": 0, + "private": 128, + "public": 0, + "scripthash": 5, + }, + "wif": 128, + }, + "explorerUrl": "https://blockstream.info", + "id": "mainnet", + "name": "Mainnet", + "unitPrefix": "", + }, + "testnet": Object { + "bitcoinJsNetwork": Object { + "bip32": Object { + "private": 70615956, + "public": 70617039, + }, + "dustThreshold": null, + "hashGenesisBlock": "000000000933ea01ad0ee984209779baaec3ced90fa3f408719526f8d77f4943", + "messagePrefix": "Bitcoin Signed Message: +", + "name": "Bitcoin", + "per1": 100000000, + "port": 18333, + "portRpc": 18332, + "protocol": Object { + "magic": 118034699, + }, + "pubKeyHash": 111, + "scriptHash": 196, + "seedsDns": Array [ + "testnet-seed.alexykot.me", + "testnet-seed.bitcoin.schildbach.de", + "testnet-seed.bitcoin.petertodd.org", + "testnet-seed.bluematt.me", + ], + "testnet": true, + "toBitcoinJS": [Function], + "toBitcore": [Function], + "unit": "BTC", + "versions": Object { + "bip32": Object { + "private": 70615956, + "public": 70617039, + }, + "bip44": 1, + "private": 239, + "public": 111, + "scripthash": 196, + }, + "wif": 239, + }, + "explorerUrl": "https://blockstream.info/testnet", + "id": "testnet", + "name": "Testnet", + "unitPrefix": "t", + }, + }, + "litecoin": Object { + "mainnet": Object { + "bitcoinJsNetwork": Object { + "bip32": Object { + "private": 27106558, + "public": 27108450, + }, + "dustThreshold": null, + "hashGenesisBlock": "12a765e31ffd4059bada1e25190f6e98c99d9714d334efa41a195a7e7e04bfe2", + "messagePrefix": "Litecoin Signed Message: +", + "name": "Litecoin", + "port": 9333, + "protocol": Object { + "magic": 3686187259, + }, + "pubKeyHash": 48, + "scriptHash": 50, + "seedsDns": Array [ + "dnsseed.litecointools.com", + "dnsseed.litecoinpool.org", + "dnsseed.ltc.xurious.com", + "dnsseed.koin-project.com", + "dnsseed.weminemnc.com", + ], + "testnet": false, + "toBitcoinJS": [Function], + "toBitcore": [Function], + "unit": "LTC", + "versions": Object { + "bip32": Object { + "private": 27106558, + "public": 27108450, + }, + "bip44": 2, + "private": 176, + "public": 48, + "scripthash": 50, + "scripthash2": 5, + }, + "wif": 176, + }, + "explorerUrl": "https://insight.litecore.io", + "id": "mainnet", + "name": "Mainnet", + "unitPrefix": "", + }, + "testnet": Object { + "bitcoinJsNetwork": Object { + "bip32": Object { + "private": 70709117, + "public": 70711009, + }, + "dustThreshold": null, + "hashGenesisBlock": "f5ae71e26c74beacc88382716aced69cddf3dffff24f384e1808905e0188f68f", + "messagePrefix": "Litecoin Signed Message: +", + "name": "Litecoin", + "pubKeyHash": 111, + "scriptHash": 58, + "testnet": true, + "toBitcoinJS": [Function], + "toBitcore": [Function], + "unit": "LTC", + "versions": Object { + "bip32": Object { + "private": 70709117, + "public": 70711009, + }, + "bip44": 1, + "private": 239, + "public": 111, + "scripthash": 58, + "scripthash2": 196, + }, + "wif": 239, + }, + "explorerUrl": "https://testnet.litecore.io", + "id": "testnet", + "name": "Testnet", + "unitPrefix": "t", + }, + }, + }, } `;