Skip to content

Commit

Permalink
Merge branch 'main' into migrate-mempool-instance
Browse files Browse the repository at this point in the history
  • Loading branch information
OmarHatem28 authored Nov 26, 2024
2 parents 2ee6eb1 + 738731d commit 72a54e4
Show file tree
Hide file tree
Showing 71 changed files with 1,159 additions and 876 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cache_dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- name: Flutter action
uses: subosito/flutter-action@v1
with:
flutter-version: "3.19.6"
flutter-version: "3.24.4"
channel: stable

- name: Install package dependencies
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/pr_test_build_android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
- name: Flutter action
uses: subosito/flutter-action@v1
with:
flutter-version: "3.19.6"
flutter-version: "3.24.4"
channel: stable

- name: Install package dependencies
Expand Down Expand Up @@ -131,12 +131,12 @@ jobs:
- name: Generate key properties
run: |
cd /opt/android/cake_wallet
flutter packages pub run tool/generate_android_key_properties.dart keyAlias=testKey storeFile=key.jks storePassword=$STORE_PASS keyPassword=$KEY_PASS
dart run tool/generate_android_key_properties.dart keyAlias=testKey storeFile=key.jks storePassword=$STORE_PASS keyPassword=$KEY_PASS
- name: Generate localization
run: |
cd /opt/android/cake_wallet
flutter packages pub run tool/generate_localization.dart
dart run tool/generate_localization.dart
- name: Build generated code
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pr_test_build_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
- name: Flutter action
uses: subosito/flutter-action@v1
with:
flutter-version: "3.19.6"
flutter-version: "3.24.4"
channel: stable

- name: Install package dependencies
Expand Down Expand Up @@ -111,7 +111,7 @@ jobs:
- name: Generate localization
run: |
cd /opt/android/cake_wallet
flutter packages pub run tool/generate_localization.dart
dart run tool/generate_localization.dart
- name: Build generated code
run: |
Expand Down
5 changes: 4 additions & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,14 @@ if (appPropertiesFile.exists()) {

android {
compileSdkVersion 34
buildToolsVersion "34.0.0"

lintOptions {
disable 'InvalidPackage'
}

namespace 'com.cakewallet.cake_wallet'

defaultConfig {
applicationId appProperties['id']
minSdkVersion 24
Expand Down Expand Up @@ -80,7 +83,7 @@ android {
}
}

ndkVersion "25.1.8937393"
ndkVersion "27.0.12077973"
}

flutter {
Expand Down
4 changes: 2 additions & 2 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
buildscript {
ext.kotlin_version = '1.8.21'
ext.kotlin_version = '2.0.21'
repositories {
google()
mavenCentral()
}

dependencies {
classpath 'com.android.tools.build:gradle:7.3.0'
classpath 'com.android.tools.build:gradle:8.7.1'
classpath 'com.google.gms:google-services:4.3.8'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
Expand Down
2 changes: 1 addition & 1 deletion android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
org.gradle.jvmargs=-Xmx3072M
org.gradle.jvmargs=-Xmx4096M
android.enableR8=true
android.useAndroidX=true
android.enableJetifier=true
2 changes: 1 addition & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip
3 changes: 0 additions & 3 deletions assets/bitcoin_electrum_server_list.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
-
uri: electrum.cakewallet.com:50002
useSSL: true
-
uri: btc-electrum.cakewallet.com:50002
useSSL: true
Expand Down
1 change: 1 addition & 0 deletions assets/node_list.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
uri: xmr-node.cakewallet.com:18081
is_default: true
trusted: true
useSSL: true
-
uri: cakexmrl7bonq7ovjka5kuwuyd3f7qnkz6z6s6dmsy3uckwra7bvggyd.onion:18081
is_default: false
Expand Down
4 changes: 2 additions & 2 deletions build-guide-linux.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,15 +120,15 @@ Install Flutter package dependencies with this command:
Your CakeWallet binary will be built with some specific keys for iterate with 3rd party services. You may generate these secret keys placeholders with the following command:

`$ flutter packages pub run tool/generate_new_secrets.dart`
`$ dart run tool/generate_new_secrets.dart`

We will generate mobx models for the project.

`$ ./model_generator.sh`

Then we need to generate localization files.

`$ flutter packages pub run tool/generate_localization.dart`
`$ dart run tool/generate_localization.dart`

### 5. Build!

Expand Down
6 changes: 3 additions & 3 deletions configure_cake_wallet.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash

set -x -e
IOS="ios"
ANDROID="android"
MACOS="macos"
Expand Down Expand Up @@ -36,6 +36,6 @@ fi
source ./app_env.sh cakewallet
./app_config.sh
cd ../.. && flutter pub get
flutter packages pub run tool/generate_localization.dart
./model_generator.sh
dart run tool/generate_localization.dart
#./model_generator.sh
#cd macos && pod install
7 changes: 4 additions & 3 deletions cw_bitcoin/lib/electrum_wallet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -486,10 +486,11 @@ abstract class ElectrumWalletBase

@action
Future<void> updateFeeRates() async {
if (await checkIfMempoolAPIIsEnabled()) {
if (await checkIfMempoolAPIIsEnabled() && type == WalletType.bitcoin) {
try {
final response =
await http.get(Uri.parse("https://mempool.cakewallet.com/api/v1/fees/recommended"));
final response = await http
.get(Uri.parse("https://mempool.cakewallet.com/api/v1/fees/recommended"))
.timeout(Duration(seconds: 5));

final result = json.decode(response.body) as Map<String, dynamic>;
final slowFee = (result['economyFee'] as num?)?.toInt() ?? 0;
Expand Down
Loading

0 comments on commit 72a54e4

Please sign in to comment.