Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions assets/bitcoin_electrum_server_list.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
-
uri: btc-electrum.cakewallet.com:50002
uri: cake.mempool.space:50002
useSSL: true
isDefault: true
isEnabledForAutoSwitching: true
Expand All @@ -9,7 +9,3 @@
uri: fulcrum.sethforprivacy.com:50002
useSSL: true
isEnabledForAutoSwitching: true
-
uri: electrum.cakewallet.com:50002
useSSL: true
isEnabledForAutoSwitching: true
10 changes: 5 additions & 5 deletions cw_bitcoin/lib/electrum_wallet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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<String, dynamic>;
Expand Down Expand Up @@ -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));
Expand All @@ -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));
Expand Down Expand Up @@ -3167,14 +3167,14 @@ Future<void> _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));
Expand Down
2 changes: 1 addition & 1 deletion cw_core/lib/get_height_by_date.dart
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ const bitcoinDates = {

Future<int> 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();
Expand Down
12 changes: 11 additions & 1 deletion lib/entities/default_settings_migration.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -554,6 +554,16 @@ Future<void> 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:
Expand Down
2 changes: 1 addition & 1 deletion lib/view_model/payjoin_details_view_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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) {}
Expand Down
2 changes: 1 addition & 1 deletion lib/view_model/transaction_details_view_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Loading