stack_wallet/lib/utilities/block_explorers.dart
Marco 26b7306d22 Merge branch 'staging' into wow
# Conflicts:
#	assets/images/wownero.png
#	lib/pages/add_wallet_views/restore_wallet_view/restore_wallet_view.dart
#	lib/services/coins/coin_service.dart
#	lib/utilities/address_utils.dart
#	lib/utilities/assets.dart
#	lib/utilities/cfcolors.dart
#	lib/utilities/constants.dart
#	lib/utilities/default_nodes.dart
#	lib/utilities/enums/coin_enum.dart
#	pubspec.yaml
2022-09-27 16:16:20 +08:00

35 lines
1.3 KiB
Dart

import 'package:stackwallet/utilities/enums/coin_enum.dart';
Uri getBlockExplorerTransactionUrlFor({
required Coin coin,
required String txid,
}) {
switch (coin) {
case Coin.bitcoin:
return Uri.parse("https://chain.so/tx/BTC/$txid");
case Coin.bitcoinTestNet:
return Uri.parse("https://chain.so/tx/BTCTEST/$txid");
case Coin.dogecoin:
return Uri.parse("https://chain.so/tx/DOGE/$txid");
case Coin.dogecoinTestNet:
return Uri.parse("https://chain.so/tx/DOGETEST/$txid");
case Coin.epicCash:
// TODO: Handle this case.
throw UnimplementedError("missing block explorer for epic cash");
case Coin.monero:
return Uri.parse("https://xmrchain.net/tx/$txid");
case Coin.wownero:
return Uri.parse("https://explore.wownero.com/search?value=$txid");
case Coin.firo:
return Uri.parse("https://explorer.firo.org/tx/$txid");
case Coin.firoTestNet:
return Uri.parse("https://testexplorer.firo.org/tx/$txid");
case Coin.bitcoincash:
return Uri.parse("https://blockchair.com/bitcoin-cash/transaction/$txid");
case Coin.bitcoincashTestnet:
return Uri.parse(
"https://blockexplorer.one/bitcoin-cash/testnet/tx/$txid");
case Coin.namecoin:
return Uri.parse("https://chainz.cryptoid.info/nmc/tx.dws?$txid.htm");
}
}