diff --git a/lib/services/coins/bitcoincash/bitcoincash_wallet.dart b/lib/services/coins/bitcoincash/bitcoincash_wallet.dart index 65464b5da..1fd4d9b66 100644 --- a/lib/services/coins/bitcoincash/bitcoincash_wallet.dart +++ b/lib/services/coins/bitcoincash/bitcoincash_wallet.dart @@ -304,14 +304,9 @@ class BitcoinCashWallet extends CoinServiceAPI { 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; default: throw Exception( - "Attempted to generate a BitcoinCashWallet using a non dogecoin coin type: ${coin.name}"); + "Attempted to generate a BitcoinCashWallet using a non bch coin type: ${coin.name}"); } } // check to make sure we aren't overwriting a mnemonic @@ -3023,7 +3018,7 @@ class BitcoinCashWallet extends CoinServiceAPI { } } - // TODO: correct formula for doge? + // TODO: correct formula for bch? int roughFeeEstimate(int inputCount, int outputCount, int feeRatePerKB) { return ((181 * inputCount) + (34 * outputCount) + 10) * (feeRatePerKB / 1000).ceil(); diff --git a/lib/services/price.dart b/lib/services/price.dart index 6a7160576..5fd124e16 100644 --- a/lib/services/price.dart +++ b/lib/services/price.dart @@ -79,7 +79,7 @@ class PriceAPI { Map> result = {}; try { final uri = Uri.parse( - "https://api.coingecko.com/api/v3/coins/markets?vs_currency=${baseCurrency.toLowerCase()}&ids=monero,bitcoin,epic-cash,zcoin,dogecoin&order=market_cap_desc&per_page=10&page=1&sparkline=false"); + "https://api.coingecko.com/api/v3/coins/markets?vs_currency=${baseCurrency.toLowerCase()}&ids=monero,bitcoin,epic-cash,zcoin,dogecoin,bitcoin-cash&order=market_cap_desc&per_page=10&page=1&sparkline=false"); // final uri = Uri.parse( // "https://api.coingecko.com/api/v3/coins/markets?vs_currency=${baseCurrency.toLowerCase()}&ids=monero%2Cbitcoin%2Cepic-cash%2Czcoin%2Cdogecoin&order=market_cap_desc&per_page=10&page=1&sparkline=false"); diff --git a/lib/utilities/block_explorers.dart b/lib/utilities/block_explorers.dart index 9040c956e..e1073e018 100644 --- a/lib/utilities/block_explorers.dart +++ b/lib/utilities/block_explorers.dart @@ -23,6 +23,6 @@ Uri getBlockExplorerTransactionUrlFor({ case Coin.firoTestNet: return Uri.parse("https://testexplorer.firo.org/tx/$txid"); case Coin.bitcoincash: - return Uri.parse("https://www.blockchain.com/bch/tx/$txid"); + return Uri.parse("https://blockchair.com/bitcoin-cash/transaction/$txid"); } } diff --git a/lib/utilities/enums/coin_enum.dart b/lib/utilities/enums/coin_enum.dart index fb7b83f5d..647709190 100644 --- a/lib/utilities/enums/coin_enum.dart +++ b/lib/utilities/enums/coin_enum.dart @@ -42,7 +42,7 @@ extension CoinExt on Coin { case Coin.monero: return "Monero"; case Coin.bitcoincash: - return "Bitcoincash"; + return "Bitcoin Cash"; case Coin.bitcoinTestNet: return "tBitcoin"; case Coin.firoTestNet: @@ -161,6 +161,7 @@ Coin coinFromPrettyName(String name) { return Coin.monero; case "Bitcoincash": case "bitcoincash": + case "Bitcoin Cash": return Coin.bitcoincash; case "Bitcoin Testnet": case "tBitcoin":