diff --git a/assets/bitcoin_electrum_server_list.yml b/assets/bitcoin_electrum_server_list.yml index c3a92e948a..ee3d1f312a 100644 --- a/assets/bitcoin_electrum_server_list.yml +++ b/assets/bitcoin_electrum_server_list.yml @@ -1,5 +1,5 @@ - - uri: btc-electrum.cakewallet.com:50002 + uri: cake.mempool.space:50002 useSSL: true isDefault: true isEnabledForAutoSwitching: true @@ -9,7 +9,3 @@ uri: fulcrum.sethforprivacy.com:50002 useSSL: true isEnabledForAutoSwitching: true -- - uri: electrum.cakewallet.com:50002 - useSSL: true - isEnabledForAutoSwitching: true diff --git a/cw_bitcoin/lib/electrum_wallet.dart b/cw_bitcoin/lib/electrum_wallet.dart index 816833cc15..40d320b188 100644 --- a/cw_bitcoin/lib/electrum_wallet.dart +++ b/cw_bitcoin/lib/electrum_wallet.dart @@ -580,7 +580,7 @@ abstract class ElectrumWalletBase if (await checkIfMempoolAPIIsEnabled() && type == WalletType.bitcoin) { try { final response = await ProxyWrapper() - .get(clearnetUri: Uri.parse("https://mempool.cakewallet.com/api/v1/fees/recommended")) + .get(clearnetUri: Uri.parse("https://cake.mempool.space/api/v1/fees/recommended")) .timeout(Duration(seconds: 15)); final result = json.decode(response.body) as Map; @@ -2103,7 +2103,7 @@ abstract class ElectrumWalletBase final blockHash = await ProxyWrapper() .get( clearnetUri: Uri.parse( - "https://mempool.cakewallet.com/api/v1/block-height/$height", + "https://cake.mempool.space/api/v1/block-height/$height", ), ) .timeout(Duration(seconds: 15)); @@ -2114,7 +2114,7 @@ abstract class ElectrumWalletBase final blockResponse = await ProxyWrapper() .get( clearnetUri: Uri.parse( - "https://mempool.cakewallet.com/api/v1/block/${blockHash.body}", + "https://cake.mempool.space/api/v1/block/${blockHash.body}", ), ) .timeout(Duration(seconds: 15)); @@ -3167,14 +3167,14 @@ Future _handleScanSilentPayments(ScanData scanData) async { final tweakBlockHash = await ProxyWrapper() .get( clearnetUri: Uri.parse( - "https://mempool.cakewallet.com/api/v1/block-height/$tweakHeight", + "https://cake.mempool.space/api/v1/block-height/$tweakHeight", ), ) .timeout(Duration(seconds: 15)); final blockResponse = await ProxyWrapper() .get( clearnetUri: Uri.parse( - "https://mempool.cakewallet.com/api/v1/block/${tweakBlockHash.body}", + "https://cake.mempool.space/api/v1/block/${tweakBlockHash.body}", ), ) .timeout(Duration(seconds: 15)); diff --git a/cw_core/lib/get_height_by_date.dart b/cw_core/lib/get_height_by_date.dart index 4786336af4..4383496ff2 100644 --- a/cw_core/lib/get_height_by_date.dart +++ b/cw_core/lib/get_height_by_date.dart @@ -274,7 +274,7 @@ const bitcoinDates = { Future getBitcoinHeightByDateAPI({required DateTime date}) async { final req = await ProxyWrapper().getHttpClient() - .getUrl(Uri.parse("https://mempool.cakewallet.com/api/v1/mining/blocks/timestamp/${(date.millisecondsSinceEpoch / 1000).round()}")) + .getUrl(Uri.parse("https://cake.mempool.space/api/v1/mining/blocks/timestamp/${(date.millisecondsSinceEpoch / 1000).round()}")) .timeout(Duration(seconds: 15)); final response = await req.close(); final stringResponse = await response.transform(utf8.decoder).join(); diff --git a/lib/entities/default_settings_migration.dart b/lib/entities/default_settings_migration.dart index 9f2ac0bcea..8b8d77b738 100644 --- a/lib/entities/default_settings_migration.dart +++ b/lib/entities/default_settings_migration.dart @@ -43,7 +43,7 @@ const nanoDefaultNodeUri = 'rpc.nano.to'; const nanoDefaultPowNodeUri = 'rpc.nano.to'; const solanaDefaultNodeUri = 'solana-mainnet.core.chainstack.com'; const tronDefaultNodeUri = 'api.trongrid.io'; -const newCakeWalletBitcoinUri = 'btc-electrum.cakewallet.com:50002'; +const newCakeWalletBitcoinUri = 'cake.mempool.space:50002'; const wowneroDefaultNodeUri = 'node3.monerodevs.org:34568'; const zanoDefaultNodeUri = '37.27.100.59:10500'; const moneroWorldNodeUri = '.moneroworld.com'; @@ -554,6 +554,16 @@ Future defaultSettingsMigration( type: WalletType.arbitrum, currentNodePreferenceKey: PreferencesKey.currentArbitrumNodeIdKey, ); + + await _changeDefaultNode( + nodes: nodes, + sharedPreferences: sharedPreferences, + type: WalletType.bitcoin, + newDefaultUri: newCakeWalletBitcoinUri, + currentNodePreferenceKey: PreferencesKey.currentBitcoinElectrumSererIdKey, + useSSL: true, + oldUri: ['cakewallet.com'], + ); break; default: diff --git a/lib/view_model/payjoin_details_view_model.dart b/lib/view_model/payjoin_details_view_model.dart index d6bebfe7f2..0b4d1eadce 100644 --- a/lib/view_model/payjoin_details_view_model.dart +++ b/lib/view_model/payjoin_details_view_model.dart @@ -83,7 +83,7 @@ abstract class PayjoinDetailsViewModelBase with Store { value: '${S.current.view_transaction_on}mempool.space', onTap: () async { try { - final uri = Uri.parse('https://mempool.cakewallet.com/tx/${payjoinSession.txId!}'); + final uri = Uri.parse('https://cake.mempool.space/tx/${payjoinSession.txId!}'); if (await canLaunchUrl(uri)) await launchUrl(uri, mode: LaunchMode.externalApplication); } catch (e) {} diff --git a/lib/view_model/transaction_details_view_model.dart b/lib/view_model/transaction_details_view_model.dart index ffe22facf0..dd041472e3 100644 --- a/lib/view_model/transaction_details_view_model.dart +++ b/lib/view_model/transaction_details_view_model.dart @@ -178,7 +178,7 @@ abstract class TransactionDetailsViewModelBase with Store { case WalletType.monero: return 'https://monero.com/tx/${txId}'; case WalletType.bitcoin: - return 'https://mempool.cakewallet.com/${wallet.isTestnet ? "testnet/" : ""}tx/${txId}'; + return 'https://cake.mempool.space/${wallet.isTestnet ? "testnet/" : ""}tx/${txId}'; case WalletType.litecoin: return 'https://blockchair.com/litecoin/transaction/${txId}'; case WalletType.bitcoinCash: