Skip to content

Commit

Permalink
Merge branch 'main' into electrum-sp-refactors
Browse files Browse the repository at this point in the history
  • Loading branch information
OmarHatem28 authored Jan 9, 2025
2 parents a09cb62 + eb28274 commit 7436140
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 13 deletions.
23 changes: 14 additions & 9 deletions lib/entities/default_settings_migration.dart
Original file line number Diff line number Diff line change
Expand Up @@ -334,20 +334,20 @@ Future<void> defaultSettingsMigration(
);
break;
case 46:
_fixNodesUseSSLFlag(nodes);
updateWalletTypeNodesWithNewNode(
await _fixNodesUseSSLFlag(nodes);
await updateWalletTypeNodesWithNewNode(
newNodeUri: 'litecoin.stackwallet.com:20063',
nodes: nodes,
type: WalletType.litecoin,
useSSL: true,
);
updateWalletTypeNodesWithNewNode(
await updateWalletTypeNodesWithNewNode(
newNodeUri: 'electrum-ltc.bysh.me:50002',
nodes: nodes,
type: WalletType.litecoin,
useSSL: true,
);
_changeDefaultNode(
await _changeDefaultNode(
nodes: nodes,
sharedPreferences: sharedPreferences,
type: WalletType.solana,
Expand All @@ -360,13 +360,13 @@ Future<void> defaultSettingsMigration(
'solana-rpc.publicnode.com:443',
],
);
_updateNode(
await _updateNode(
nodes: nodes,
currentUri: "ethereum.publicnode.com",
newUri: "ethereum-rpc.publicnode.com",
useSSL: true,
);
_updateNode(
await _updateNode(
nodes: nodes,
currentUri: "polygon-bor.publicnode.com",
newUri: "polygon-bor-rpc.publicnode.com",
Expand All @@ -387,20 +387,24 @@ Future<void> defaultSettingsMigration(
await sharedPreferences.setInt(PreferencesKey.currentDefaultSettingsMigrationVersion, version);
}

void _updateNode({
Future<void> _updateNode({
required Box<Node> nodes,
required String currentUri,
String? newUri,
bool? useSSL,
}) {
}) async {
for (Node node in nodes.values) {
print("@@@@@@@@@@@@@");
print(node.uriRaw);
print(node.uri);
if (node.uriRaw == currentUri) {
if (newUri != null) {
node.uriRaw = newUri;
}
if (useSSL != null) {
node.useSSL = useSSL;
}
await node.save();
}
}
}
Expand Down Expand Up @@ -481,7 +485,7 @@ void _deselectExchangeProvider(SharedPreferences sharedPreferences, String provi
);
}

void _fixNodesUseSSLFlag(Box<Node> nodes) {
Future<void> _fixNodesUseSSLFlag(Box<Node> nodes) async {
for (Node node in nodes.values) {
switch (node.uriRaw) {
case cakeWalletLitecoinElectrumUri:
Expand All @@ -490,6 +494,7 @@ void _fixNodesUseSSLFlag(Box<Node> nodes) {
case newCakeWalletMoneroUri:
node.useSSL = true;
node.trusted = true;
await node.save();
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion scripts/android/app_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ MONERO_COM_SCHEME="monero.com"

CAKEWALLET_NAME="Cake Wallet"
CAKEWALLET_VERSION="4.22.1"
CAKEWALLET_BUILD_NUMBER=241
CAKEWALLET_BUILD_NUMBER=242
CAKEWALLET_BUNDLE_ID="com.cakewallet.cake_wallet"
CAKEWALLET_PACKAGE="com.cakewallet.cake_wallet"
CAKEWALLET_SCHEME="cakewallet"
Expand Down
2 changes: 1 addition & 1 deletion scripts/ios/app_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ MONERO_COM_BUNDLE_ID="com.cakewallet.monero"

CAKEWALLET_NAME="Cake Wallet"
CAKEWALLET_VERSION="4.22.1"
CAKEWALLET_BUILD_NUMBER=288
CAKEWALLET_BUILD_NUMBER=289
CAKEWALLET_BUNDLE_ID="com.fotolockr.cakewallet"

HAVEN_NAME="Haven"
Expand Down
2 changes: 1 addition & 1 deletion scripts/linux/app_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ fi

CAKEWALLET_NAME="Cake Wallet"
CAKEWALLET_VERSION="1.12.1"
CAKEWALLET_BUILD_NUMBER=42
CAKEWALLET_BUILD_NUMBER=43

if ! [[ " ${TYPES[*]} " =~ " ${APP_LINUX_TYPE} " ]]; then
echo "Wrong app type."
Expand Down
2 changes: 1 addition & 1 deletion scripts/macos/app_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ MONERO_COM_BUNDLE_ID="com.cakewallet.monero"

CAKEWALLET_NAME="Cake Wallet"
CAKEWALLET_VERSION="1.15.1"
CAKEWALLET_BUILD_NUMBER=100
CAKEWALLET_BUILD_NUMBER=101
CAKEWALLET_BUNDLE_ID="com.fotolockr.cakewallet"

if ! [[ " ${TYPES[*]} " =~ " ${APP_MACOS_TYPE} " ]]; then
Expand Down

0 comments on commit 7436140

Please sign in to comment.