mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-12-23 03:49:22 +00:00
Update blockexplorer for bch and fix USD amount not showing in send view
This commit is contained in:
parent
cbb3c3f241
commit
e365bb0c16
4 changed files with 6 additions and 10 deletions
|
@ -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();
|
||||
|
|
|
@ -79,7 +79,7 @@ class PriceAPI {
|
|||
Map<Coin, Tuple2<Decimal, double>> 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");
|
||||
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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":
|
||||
|
|
Loading…
Reference in a new issue