From eff6616981cd2fe453e0322e5d8e05f30ab6b4c0 Mon Sep 17 00:00:00 2001 From: Seth For Privacy <40500387+sethforprivacy@users.noreply.github.com> Date: Tue, 26 Nov 2024 09:56:00 -0500 Subject: [PATCH] Migrate to new self-hosted mempool.space instance (#1820) Co-authored-by: Omar Hatem --- cw_bitcoin/lib/electrum_wallet.dart | 4 ++-- cw_core/lib/get_height_by_date.dart | 2 +- lib/view_model/transaction_details_view_model.dart | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cw_bitcoin/lib/electrum_wallet.dart b/cw_bitcoin/lib/electrum_wallet.dart index 73f7e09f5..c29df3c4a 100644 --- a/cw_bitcoin/lib/electrum_wallet.dart +++ b/cw_bitcoin/lib/electrum_wallet.dart @@ -1707,7 +1707,7 @@ abstract class ElectrumWalletBase try { final blockHash = await http.get( Uri.parse( - "http://mempool.cakewallet.com:8999/api/v1/block-height/$height", + "https://mempool.cakewallet.com/api/v1/block-height/$height", ), ); @@ -1716,7 +1716,7 @@ abstract class ElectrumWalletBase jsonDecode(blockHash.body) != null) { final blockResponse = await http.get( Uri.parse( - "http://mempool.cakewallet.com:8999/api/v1/block/${blockHash.body}", + "https://mempool.cakewallet.com/api/v1/block/${blockHash.body}", ), ); if (blockResponse.statusCode == 200 && diff --git a/cw_core/lib/get_height_by_date.dart b/cw_core/lib/get_height_by_date.dart index 2b0b77a89..7929d7cbd 100644 --- a/cw_core/lib/get_height_by_date.dart +++ b/cw_core/lib/get_height_by_date.dart @@ -270,7 +270,7 @@ const bitcoinDates = { Future getBitcoinHeightByDateAPI({required DateTime date}) async { final response = await http.get( Uri.parse( - "http://mempool.cakewallet.com:8999/api/v1/mining/blocks/timestamp/${(date.millisecondsSinceEpoch / 1000).round()}", + "https://mempool.cakewallet.com/api/v1/mining/blocks/timestamp/${(date.millisecondsSinceEpoch / 1000).round()}", ), ); diff --git a/lib/view_model/transaction_details_view_model.dart b/lib/view_model/transaction_details_view_model.dart index a189ebe6c..e675acf17 100644 --- a/lib/view_model/transaction_details_view_model.dart +++ b/lib/view_model/transaction_details_view_model.dart @@ -159,7 +159,7 @@ abstract class TransactionDetailsViewModelBase with Store { case WalletType.monero: return 'https://monero.com/tx/${txId}'; case WalletType.bitcoin: - return 'https://mempool.space/${wallet.isTestnet ? "testnet/" : ""}tx/${txId}'; + return 'https://mempool.cakewallet.com/${wallet.isTestnet ? "testnet/" : ""}tx/${txId}'; case WalletType.litecoin: return 'https://blockchair.com/litecoin/transaction/${txId}'; case WalletType.bitcoinCash: