diff --git a/android/app/build.gradle b/android/app/build.gradle
index 651309f..3280a18 100644
--- a/android/app/build.gradle
+++ b/android/app/build.gradle
@@ -26,7 +26,7 @@ apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android {
- compileSdkVersion 28
+ compileSdkVersion 31
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
diff --git a/ios/Flutter/AppFrameworkInfo.plist b/ios/Flutter/AppFrameworkInfo.plist
index 9367d48..8d4492f 100644
--- a/ios/Flutter/AppFrameworkInfo.plist
+++ b/ios/Flutter/AppFrameworkInfo.plist
@@ -21,6 +21,6 @@
CFBundleVersion
1.0
MinimumOSVersion
- 8.0
+ 9.0
diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj
index 266d0c3..88ebe4d 100644
--- a/ios/Runner.xcodeproj/project.pbxproj
+++ b/ios/Runner.xcodeproj/project.pbxproj
@@ -158,7 +158,7 @@
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
- LastUpgradeCheck = 1240;
+ LastUpgradeCheck = 1300;
ORGANIZATIONNAME = "";
TargetAttributes = {
97C146ED1CF9000F007C117D = {
diff --git a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
index 67d68c7..547e4f7 100644
--- a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
+++ b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
@@ -1,6 +1,6 @@
main() async {
}
class MainApp extends StatelessWidget {
- MainApp(this.stores, {Key? key}) : super(key: key);
+ const MainApp(this.stores, {Key? key}) : super(key: key);
final List stores;
diff --git a/lib/service/address_service.dart b/lib/service/address_service.dart
index 38447a8..7233163 100644
--- a/lib/service/address_service.dart
+++ b/lib/service/address_service.dart
@@ -1,8 +1,8 @@
-import 'package:etherwallet/service/configuration_service.dart';
import 'package:bip39/bip39.dart' as bip39;
+import 'package:convert/convert.dart';
import 'package:ed25519_hd_key/ed25519_hd_key.dart';
+import 'package:etherwallet/service/configuration_service.dart';
import 'package:hex/hex.dart';
-import 'package:convert/convert.dart';
import 'package:web3dart/credentials.dart';
abstract class IAddressService {
diff --git a/lib/service/contract_locator.dart b/lib/service/contract_locator.dart
index f9fc428..5186927 100644
--- a/lib/service/contract_locator.dart
+++ b/lib/service/contract_locator.dart
@@ -2,11 +2,11 @@ import 'package:etherwallet/app_config.dart';
import 'package:etherwallet/model/network_type.dart';
import 'package:etherwallet/service/contract_service.dart';
import 'package:etherwallet/utils/contract_parser.dart';
+import 'package:flutter/foundation.dart' show kIsWeb;
+import 'package:http/http.dart';
import 'package:web3dart/web3dart.dart';
import 'package:web_socket_channel/io.dart';
-import 'package:http/http.dart';
import 'package:web_socket_channel/web_socket_channel.dart';
-import 'package:flutter/foundation.dart' show kIsWeb;
class ContractLocator {
ContractLocator._();
diff --git a/lib/service/contract_service.dart b/lib/service/contract_service.dart
index 4cb36ab..b55c03e 100644
--- a/lib/service/contract_service.dart
+++ b/lib/service/contract_service.dart
@@ -8,7 +8,7 @@ typedef TransferEvent = void Function(
);
abstract class IContractService {
- Future getCredentials(String privateKey);
+ EthPrivateKey getCredentials(String privateKey);
Future send(
String privateKey, EthereumAddress receiver, BigInt amount,
{TransferEvent? onTransfer, Function(Object exeception)? onError});
@@ -29,14 +29,14 @@ class ContractService implements IContractService {
ContractFunction _sendFunction() => contract.function('transfer');
@override
- Future getCredentials(String privateKey) =>
- client.credentialsFromPrivateKey(privateKey);
+ EthPrivateKey getCredentials(String privateKey) =>
+ EthPrivateKey.fromHex(privateKey);
@override
Future send(
String privateKey, EthereumAddress receiver, BigInt amount,
{TransferEvent? onTransfer, Function(Object exeception)? onError}) async {
- final credentials = await getCredentials(privateKey);
+ final credentials = getCredentials(privateKey);
final from = await credentials.extractAddress();
final networkId = await client.getNetworkId();
diff --git a/lib/utils/contract_parser.dart b/lib/utils/contract_parser.dart
index 11cb005..bfbc735 100644
--- a/lib/utils/contract_parser.dart
+++ b/lib/utils/contract_parser.dart
@@ -3,6 +3,7 @@ import 'package:flutter/services.dart' show rootBundle;
import 'package:web3dart/contracts.dart';
import 'package:web3dart/credentials.dart';
+// ignore: avoid_classes_with_only_static_members
class ContractParser {
static Future fromAssets(
String path, String contractAddress) async {
diff --git a/lib/wallet_transfer_page.dart b/lib/wallet_transfer_page.dart
index 954a792..b71af4e 100644
--- a/lib/wallet_transfer_page.dart
+++ b/lib/wallet_transfer_page.dart
@@ -1,9 +1,9 @@
import 'package:etherwallet/components/wallet/transfer_form.dart';
import 'package:etherwallet/context/transfer/wallet_transfer_provider.dart';
import 'package:etherwallet/model/network_type.dart';
+import 'package:flutter/foundation.dart' show kIsWeb;
import 'package:flutter/material.dart';
import 'package:flutter_hooks/flutter_hooks.dart';
-import 'package:flutter/foundation.dart' show kIsWeb;
import 'components/wallet/loading.dart';
diff --git a/pubspec.lock b/pubspec.lock
index fe5a8f1..8580928 100644
--- a/pubspec.lock
+++ b/pubspec.lock
@@ -401,6 +401,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "0.12.11"
+ material_color_utilities:
+ dependency: transitive
+ description:
+ name: material_color_utilities
+ url: "https://pub.dartlang.org"
+ source: hosted
+ version: "0.1.3"
meta:
dependency: transitive
description:
@@ -692,7 +699,7 @@ packages:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
- version: "0.4.3"
+ version: "0.4.8"
timing:
dependency: transitive
description:
@@ -790,7 +797,7 @@ packages:
name: web3dart
url: "https://pub.dartlang.org"
source: hosted
- version: "2.3.3"
+ version: "2.3.5"
web_socket_channel:
dependency: "direct main"
description:
diff --git a/pubspec.yaml b/pubspec.yaml
index 9577e22..9fd7c8b 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
-version: 2.3.0+10
+version: 2.4.0+11
environment:
sdk: ">=2.12.0 <3.0.0"
@@ -28,9 +28,10 @@ dependencies:
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.4
- web3dart: ^2.3.3
+ web3dart: ^2.3.5
provider: ^6.0.2
qr_flutter: ^4.0.0
+ # used to generate pneumonic phrase
bip39: ^1.0.6
hex: ^0.2.0
shared_preferences: ^2.0.12
@@ -46,6 +47,7 @@ dependencies:
built_collection: ^5.1.1
ed25519_hd_key: ^2.2.0
+
dev_dependencies:
flutter_test:
sdk: flutter