Update bch network

This commit is contained in:
Likho 2022-09-07 13:11:50 +02:00
parent d5b82f26f7
commit 5cbaa597d3
2 changed files with 8 additions and 8 deletions

View file

@ -77,7 +77,7 @@ bip32.BIP32 getBip32NodeFromRoot(
int chain, int index, bip32.BIP32 root, DerivePathType derivePathType) {
String coinType;
switch (root.network.wif) {
case 0x9e: // bch mainnet wif
case 0x80: // bch mainnet wif
coinType = "145"; // bch mainnet
break;
default:
@ -298,16 +298,16 @@ class BitcoinCashWallet extends CoinServiceAPI {
final features = await electrumXClient.getServerFeatures();
Logging.instance.log("features: $features", level: LogLevel.Info);
switch (coin) {
case Coin.dogecoin:
case Coin.bitcoincash:
if (features['genesis_hash'] != GENESIS_HASH_MAINNET) {
throw Exception("genesis hash does not match main net!");
}
break;
case Coin.dogecoinTestNet:
if (features['genesis_hash'] != GENESIS_HASH_TESTNET) {
throw Exception("genesis hash does not match test net!");
}
break;
// case Coin.dogecoinTestNet:
// if (features['genesis_hash'] != GENESIS_HASH_TESTNET) {
// throw Exception("genesis hash does not match test net!");
// }
// break;
default:
throw Exception(
"Attempted to generate a BitcoinCashWallet using a non dogecoin coin type: ${coin.name}");

View file

@ -82,7 +82,7 @@ abstract class DefaultNodes {
);
static NodeModel get bitcoincash => NodeModel(
host: "https://electrum1.cipig.net:20055",
host: "electrum1.cipig.net",
port: 20055,
name: defaultName,
id: _nodeId(Coin.bitcoincash),