Skip to content

Commit

Permalink
Upgrades to dependencies, FlatButton migration
Browse files Browse the repository at this point in the history
  • Loading branch information
bbedward committed Aug 30, 2023
1 parent 68e834a commit bc3e0b3
Show file tree
Hide file tree
Showing 45 changed files with 1,157 additions and 608 deletions.
13 changes: 7 additions & 6 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,13 @@ if (keystorePropertiesFile.exists()) {
}

android {
compileSdkVersion 32
compileSdkVersion 34

lintOptions {
disable 'InvalidPackage'
}

defaultConfig {
applicationId "co.banano.natriumwallet"
minSdkVersion 19
targetSdkVersion 32
targetSdkVersion 34
multiDexEnabled true
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
Expand Down Expand Up @@ -74,11 +71,15 @@ android {
}
ndk {
abiFilters 'armeabi-v7a','arm64-v8a','x86_64'
}
}
}
}

ndkVersion "25.1.8937393"
namespace 'co.banano.natriumwallet'
lint {
disable 'InvalidPackage'
}
}

flutter {
Expand Down
7 changes: 3 additions & 4 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="co.banano.natriumwallet">
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="co.banano.natriumwallet">

<!-- The INTERNET permission is required for development. Specifically,
flutter needs it to communicate with the running application
Expand All @@ -24,7 +23,7 @@
android:allowBackup="false">
<meta-data
android:name="flutterEmbedding"
android:value="2" />
android:value="2" />
<meta-data
android:name="com.google.firebase.messaging.default_notification_icon"
android:resource="@drawable/ic_status_bar" />
Expand Down Expand Up @@ -81,5 +80,5 @@
<action android:name="android.intent.action.VIEW" />
<data android:scheme="https" />
</intent>
</queries>
</queries>
</manifest>
8 changes: 4 additions & 4 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
buildscript {
ext.kotlin_version = '1.4.31'
ext.kotlin_version = '1.6.21'

repositories {
google()
mavenCentral()
}

dependencies {
classpath 'com.android.tools.build:gradle:4.2.0'
classpath 'com.android.tools.build:gradle:7.4.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.3.4'
classpath 'com.google.gms:google-services:4.3.14'
}
}

Expand All @@ -30,4 +30,4 @@ subprojects {

task clean(type: Delete) {
delete rootProject.buildDir
}
}
3 changes: 1 addition & 2 deletions android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#Fri Jun 23 08:50:38 CEST 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip
2 changes: 1 addition & 1 deletion ios/Flutter/AppFrameworkInfo.plist
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>9.0</string>
<string>11.0</string>
</dict>
</plist>
18 changes: 18 additions & 0 deletions ios/Flutter/Flutter.podspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#
# NOTE: This podspec is NOT to be published. It is only used as a local source!
# This is a generated file; do not edit or check into version control.
#

Pod::Spec.new do |s|
s.name = 'Flutter'
s.version = '1.0.0'
s.summary = 'A UI toolkit for beautiful and fast apps.'
s.homepage = 'https://flutter.dev'
s.license = { :type => 'BSD' }
s.author = { 'Flutter Dev Team' => '[email protected]' }
s.source = { :git => 'https://github.com/flutter/engine', :tag => s.version.to_s }
s.ios.deployment_target = '11.0'
# Framework linking is handled by Flutter tooling, not CocoaPods.
# Add a placeholder to satisfy `s.dependency 'Flutter'` plugin podspecs.
s.vendored_frameworks = 'path/to/nothing'
end
2 changes: 1 addition & 1 deletion ios/Podfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'
# platform :ios, '11.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
Expand Down
42 changes: 27 additions & 15 deletions ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objectVersion = 50;
objects = {

/* Begin PBXBuildFile section */
Expand Down Expand Up @@ -250,7 +250,7 @@
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1120;
LastUpgradeCheck = 1300;
ORGANIZATIONNAME = "The Chromium Authors";
TargetAttributes = {
97C146ED1CF9000F007C117D = {
Expand Down Expand Up @@ -386,7 +386,7 @@
"${BUILT_PRODUCTS_DIR}/DKPhotoGallery/DKPhotoGallery.framework",
"${BUILT_PRODUCTS_DIR}/FMDB/FMDB.framework",
"${BUILT_PRODUCTS_DIR}/FirebaseCore/FirebaseCore.framework",
"${BUILT_PRODUCTS_DIR}/FirebaseCoreDiagnostics/FirebaseCoreDiagnostics.framework",
"${BUILT_PRODUCTS_DIR}/FirebaseCoreInternal/FirebaseCoreInternal.framework",
"${BUILT_PRODUCTS_DIR}/FirebaseInstallations/FirebaseInstallations.framework",
"${BUILT_PRODUCTS_DIR}/FirebaseMessaging/FirebaseMessaging.framework",
"${BUILT_PRODUCTS_DIR}/GoogleDataTransport/GoogleDataTransport.framework",
Expand All @@ -402,16 +402,16 @@
"${BUILT_PRODUCTS_DIR}/flutter_nano_ffi/flutter_nano_ffi.framework",
"${BUILT_PRODUCTS_DIR}/flutter_secure_storage/flutter_secure_storage.framework",
"${BUILT_PRODUCTS_DIR}/flutter_webview_plugin/flutter_webview_plugin.framework",
"${BUILT_PRODUCTS_DIR}/local_auth/local_auth.framework",
"${BUILT_PRODUCTS_DIR}/local_auth_ios/local_auth_ios.framework",
"${BUILT_PRODUCTS_DIR}/nanopb/nanopb.framework",
"${BUILT_PRODUCTS_DIR}/package_info/package_info.framework",
"${BUILT_PRODUCTS_DIR}/path_provider_ios/path_provider_ios.framework",
"${BUILT_PRODUCTS_DIR}/path_provider_foundation/path_provider_foundation.framework",
"${BUILT_PRODUCTS_DIR}/root_checker/root_checker.framework",
"${BUILT_PRODUCTS_DIR}/share/share.framework",
"${BUILT_PRODUCTS_DIR}/shared_preferences_ios/shared_preferences_ios.framework",
"${BUILT_PRODUCTS_DIR}/shared_preferences_foundation/shared_preferences_foundation.framework",
"${BUILT_PRODUCTS_DIR}/sqflite/sqflite.framework",
"${BUILT_PRODUCTS_DIR}/uni_links/uni_links.framework",
"${BUILT_PRODUCTS_DIR}/url_launcher/url_launcher.framework",
"${BUILT_PRODUCTS_DIR}/url_launcher_ios/url_launcher_ios.framework",
"${BUILT_PRODUCTS_DIR}/vibrate/vibrate.framework",
);
name = "[CP] Embed Pods Frameworks";
Expand All @@ -420,7 +420,7 @@
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DKPhotoGallery.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FMDB.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseCore.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseCoreDiagnostics.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseCoreInternal.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseInstallations.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseMessaging.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GoogleDataTransport.framework",
Expand All @@ -436,16 +436,16 @@
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/flutter_nano_ffi.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/flutter_secure_storage.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/flutter_webview_plugin.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/local_auth.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/local_auth_ios.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/nanopb.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/package_info.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/path_provider_ios.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/path_provider_foundation.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/root_checker.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/share.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/shared_preferences_ios.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/shared_preferences_foundation.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/sqflite.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/uni_links.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/url_launcher.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/url_launcher_ios.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/vibrate.framework",
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -558,7 +558,11 @@
"$(PROJECT_DIR)/Flutter",
);
INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
Expand Down Expand Up @@ -699,7 +703,11 @@
"$(PROJECT_DIR)/Flutter",
);
INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
Expand Down Expand Up @@ -732,7 +740,11 @@
"$(PROJECT_DIR)/Flutter",
);
INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1120"
LastUpgradeVersion = "1300"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
2 changes: 2 additions & 0 deletions ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -150,5 +150,7 @@
</dict>
</dict>
</dict>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
</dict>
</plist>
10 changes: 5 additions & 5 deletions lib/appstate_container.dart
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ class StateContainerState extends State<StateContainer> {
updateActiveAlert(null, alert);
}
} catch (e) {
log.e("Error retrieving alert", e);
log.e("Error retrieving alert", error: e);
return;
}
}
Expand Down Expand Up @@ -629,7 +629,7 @@ class StateContainerState extends State<StateContainer> {
return resp.hash;
} catch (e) {
pendingRequests.remove(item.hash);
sl.get<Logger>().e("Error creating open", e);
sl.get<Logger>().e("Error creating open", error: e);
}
} else {
// Publish receive
Expand All @@ -648,7 +648,7 @@ class StateContainerState extends State<StateContainer> {
return resp.hash;
} catch (e) {
pendingRequests.remove(item.hash);
sl.get<Logger>().e("Error creating receive", e);
sl.get<Logger>().e("Error creating receive", error: e);
}
}
return null;
Expand All @@ -658,7 +658,7 @@ class StateContainerState extends State<StateContainer> {
Future<void> _requestBalances() async {
List<Account> accounts =
await sl.get<DBHelper>().getAccounts(await getSeed());
List<String> addressToRequest = List();
List<String> addressToRequest = [];
accounts.forEach((account) {
if (account.address != null) {
addressToRequest.add(account.address);
Expand Down Expand Up @@ -782,7 +782,7 @@ class StateContainerState extends State<StateContainer> {
}
} catch (e) {
// TODO handle account history error
sl.get<Logger>().e("account_history e", e);
sl.get<Logger>().e("account_history e", error: e);
}
}
}
Expand Down
8 changes: 4 additions & 4 deletions lib/network/account_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ import 'package:natrium_wallet_flutter/network/model/response/process_response.d
import 'package:natrium_wallet_flutter/bus/events.dart';

// Server Connection String
const String _SERVER_ADDRESS = "wss://testapp.natrium.io";
const String _SERVER_ADDRESS_HTTP = "https://testapp.natrium.io/api";
const String _SERVER_ADDRESS_ALERTS = "https://testapp.natrium.io/alerts";
const String _SERVER_ADDRESS = "wss://app.natrium.io";
const String _SERVER_ADDRESS_HTTP = "https://app.natrium.io/api";
const String _SERVER_ADDRESS_ALERTS = "https://app.natrium.io/alerts";

Map decodeJson(dynamic src) {
return json.decode(src);
Expand Down Expand Up @@ -126,7 +126,7 @@ class AccountService {
_channel.stream.listen(_onMessageReceived,
onDone: connectionClosed, onError: connectionClosedError);
} catch (e) {
log.e("Error from service ${e.toString()}", e);
log.e("Error from service ${e.toString()}", error: e);
_isConnected = false;
_isConnecting = false;
EventTaxiImpl.singleton()
Expand Down
1 change: 1 addition & 0 deletions lib/ui/accounts/accountdetails_sheet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import 'package:natrium_wallet_flutter/ui/util/ui_util.dart';
import 'package:natrium_wallet_flutter/ui/widgets/app_text_field.dart';
import 'package:natrium_wallet_flutter/ui/widgets/buttons.dart';
import 'package:natrium_wallet_flutter/ui/widgets/dialog.dart';
import 'package:natrium_wallet_flutter/ui/widgets/flat_button.dart';
import 'package:natrium_wallet_flutter/ui/widgets/sheets.dart';
import 'package:natrium_wallet_flutter/ui/widgets/tap_outside_unfocus.dart';
import 'package:natrium_wallet_flutter/util/caseconverter.dart';
Expand Down
3 changes: 2 additions & 1 deletion lib/ui/accounts/accounts_sheet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import 'package:natrium_wallet_flutter/model/db/appdb.dart';
import 'package:natrium_wallet_flutter/model/db/account.dart';
import 'package:natrium_wallet_flutter/ui/accounts/accountdetails_sheet.dart';
import 'package:natrium_wallet_flutter/ui/util/ui_util.dart';
import 'package:natrium_wallet_flutter/ui/widgets/flat_button.dart';
import 'package:natrium_wallet_flutter/ui/widgets/sheets.dart';
import 'package:natrium_wallet_flutter/ui/widgets/buttons.dart';
import 'package:natrium_wallet_flutter/ui/widgets/dialog.dart';
Expand Down Expand Up @@ -149,7 +150,7 @@ class _AppAccountsWidgetState extends State<AppAccountsWidget> {
await sl.get<AccountService>().requestAccountsBalances(addresses);
await _handleAccountsBalancesResponse(resp);
} catch (e) {
sl.get<Logger>().e("Error", e);
sl.get<Logger>().e("Error", error: e);
}
}

Expand Down
1 change: 1 addition & 0 deletions lib/ui/avatar/avatar_change.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import 'package:natrium_wallet_flutter/ui/avatar/nonce_response.dart';
import 'package:natrium_wallet_flutter/ui/send/send_confirm_sheet.dart';
import 'package:natrium_wallet_flutter/ui/util/ui_util.dart';
import 'package:natrium_wallet_flutter/ui/widgets/buttons.dart';
import 'package:natrium_wallet_flutter/ui/widgets/flat_button.dart';
import 'package:natrium_wallet_flutter/ui/widgets/sheet_util.dart';
import 'dart:math' as math;

Expand Down
13 changes: 11 additions & 2 deletions lib/ui/contacts/contact_details.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import 'package:natrium_wallet_flutter/ui/send/send_sheet.dart';
import 'package:natrium_wallet_flutter/ui/util/ui_util.dart';
import 'package:natrium_wallet_flutter/ui/widgets/buttons.dart';
import 'package:natrium_wallet_flutter/ui/widgets/dialog.dart';
import 'package:natrium_wallet_flutter/ui/widgets/flat_button.dart';
import 'package:natrium_wallet_flutter/ui/widgets/sheet_util.dart';
import 'package:natrium_wallet_flutter/ui/widgets/sheets.dart';
import 'package:natrium_wallet_flutter/util/caseconverter.dart';
Expand Down Expand Up @@ -176,8 +177,16 @@ class ContactDetailsSheet {
StateContainer.of(context).natriconOn
? Expanded(
child: SvgPicture.network(
UIUtil.getNatriconURL(contact.address, StateContainer.of(context).getNatriconNonce(contact.address)),
key: Key(UIUtil.getNatriconURL(contact.address, StateContainer.of(context).getNatriconNonce(contact.address))),
UIUtil.getNatriconURL(
contact.address,
StateContainer.of(context)
.getNatriconNonce(
contact.address)),
key: Key(UIUtil.getNatriconURL(
contact.address,
StateContainer.of(context)
.getNatriconNonce(
contact.address))),
placeholderBuilder:
(BuildContext context) => Container(
child: FlareActor(
Expand Down
Loading

0 comments on commit bc3e0b3

Please sign in to comment.