Skip to content
Draft
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -155,3 +155,4 @@ linux/appimage/AppDir/data/
linux/appimage/AppDir/lib/
android/secret/ae-wallet-c8d742e33023.json
fastlane/FastlaneUtils
.cursorrules
25 changes: 20 additions & 5 deletions .metadata
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# This file should be version controlled and should not be manually edited.

version:
revision: "603104015dd692ea3403755b55d07813d5cf8965"
revision: "c23637390482d4cf9598c3ce3f2be31aa7332daf"
channel: "stable"

project_type: app
Expand All @@ -13,11 +13,26 @@ project_type: app
migration:
platforms:
- platform: root
create_revision: 603104015dd692ea3403755b55d07813d5cf8965
base_revision: 603104015dd692ea3403755b55d07813d5cf8965
create_revision: c23637390482d4cf9598c3ce3f2be31aa7332daf
base_revision: c23637390482d4cf9598c3ce3f2be31aa7332daf
- platform: android
create_revision: 603104015dd692ea3403755b55d07813d5cf8965
base_revision: 603104015dd692ea3403755b55d07813d5cf8965
create_revision: c23637390482d4cf9598c3ce3f2be31aa7332daf
base_revision: c23637390482d4cf9598c3ce3f2be31aa7332daf
- platform: ios
create_revision: c23637390482d4cf9598c3ce3f2be31aa7332daf
base_revision: c23637390482d4cf9598c3ce3f2be31aa7332daf
- platform: linux
create_revision: c23637390482d4cf9598c3ce3f2be31aa7332daf
base_revision: c23637390482d4cf9598c3ce3f2be31aa7332daf
- platform: macos
create_revision: c23637390482d4cf9598c3ce3f2be31aa7332daf
base_revision: c23637390482d4cf9598c3ce3f2be31aa7332daf
- platform: web
create_revision: c23637390482d4cf9598c3ce3f2be31aa7332daf
base_revision: c23637390482d4cf9598c3ce3f2be31aa7332daf
- platform: windows
create_revision: c23637390482d4cf9598c3ce3f2be31aa7332daf
base_revision: c23637390482d4cf9598c3ce3f2be31aa7332daf

# User provided section

Expand Down
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -241,3 +241,4 @@ Storage **Boxes** are split into categories :
### Encrypted boxes

- **[NonWebAuthentication](./lib/infrastructure/datasources/authent_nonweb.secured_hive.dart)** : User authentication data (pin/password)
- **[MessengerDiscussion](./lib/infrastructure/datasources/discussion.vault.dart)** : [Discussions data](./lib/model/data/messenger/discussion.dart)
3 changes: 3 additions & 0 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
plugins {
id "com.android.application"
// START: FlutterFire Configuration
id 'com.google.gms.google-services'
// END: FlutterFire Configuration
id "kotlin-android"
id "dev.flutter.flutter-gradle-plugin"
}
Expand Down
10 changes: 9 additions & 1 deletion android/app/google-services.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"project_info": {
"project_number": "329689363769",
"project_id": "ae-wallet",
"storage_bucket": "ae-wallet.appspot.com"
"storage_bucket": "ae-wallet.firebasestorage.app"
},
"client": [
{
Expand All @@ -29,6 +29,14 @@
{
"client_id": "329689363769-asrrmmau1hdjvvjkq6mdh7hmems0rseg.apps.googleusercontent.com",
"client_type": 3
},
{
"client_id": "329689363769-re7ceq81mq45tb1tpcc3lsdtrldhcjkb.apps.googleusercontent.com",
"client_type": 2,
"ios_info": {
"bundle_id": "tech.archethic.wallet",
"app_store_id": "6443334906"
}
}
]
}
Expand Down
1 change: 1 addition & 0 deletions android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version '8.9.0' apply false
id "org.jetbrains.kotlin.android" version "1.8.22" apply false
id("com.google.gms.google-services") version "4.4.2" apply false
}

include ":app"
17 changes: 1 addition & 16 deletions firebase.json
Original file line number Diff line number Diff line change
@@ -1,16 +1 @@
{
"hosting": {
"public": "build/webapp",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
}
}
{"flutter":{"platforms":{"android":{"default":{"projectId":"ae-wallet","appId":"1:329689363769:android:404e2e22d694f07d0fe4e8","fileOutput":"android/app/google-services.json"}},"ios":{"default":{"projectId":"ae-wallet","appId":"1:329689363769:ios:a0df2fae4b37b34b0fe4e8","uploadDebugSymbols":false,"fileOutput":"ios/Runner/GoogleService-Info.plist"}},"dart":{"lib/firebase_options.dart":{"projectId":"ae-wallet","configurations":{"android":"1:329689363769:android:404e2e22d694f07d0fe4e8","ios":"1:329689363769:ios:a0df2fae4b37b34b0fe4e8"}}}}}}
18 changes: 18 additions & 0 deletions ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@
9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
77BBAE7D4BD9C8BB1C3BC061 /* [CP] Embed Pods Frameworks */,
68876C69B959A28934876F71 /* [CP] Copy Pods Resources */,
);
buildRules = (
);
Expand Down Expand Up @@ -248,6 +249,23 @@
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
};
68876C69B959A28934876F71 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist",
);
name = "[CP] Copy Pods Resources";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
showEnvVarsInLog = 0;
};
77BBAE7D4BD9C8BB1C3BC061 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
Expand Down
6 changes: 3 additions & 3 deletions ios/Runner/GoogleService-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<plist version="1.0">
<dict>
<key>CLIENT_ID</key>
<string>329689363769-rstsnvo072vu861fhn0v5auel16ji7v4.apps.googleusercontent.com</string>
<string>329689363769-re7ceq81mq45tb1tpcc3lsdtrldhcjkb.apps.googleusercontent.com</string>
<key>REVERSED_CLIENT_ID</key>
<string>com.googleusercontent.apps.329689363769-rstsnvo072vu861fhn0v5auel16ji7v4</string>
<string>com.googleusercontent.apps.329689363769-re7ceq81mq45tb1tpcc3lsdtrldhcjkb</string>
<key>API_KEY</key>
<string>AIzaSyAz3x3eLLAzs3DXAQWXN5S9JkMqDTNKahs</string>
<key>GCM_SENDER_ID</key>
Expand All @@ -17,7 +17,7 @@
<key>PROJECT_ID</key>
<string>ae-wallet</string>
<key>STORAGE_BUCKET</key>
<string>ae-wallet.appspot.com</string>
<string>ae-wallet.firebasestorage.app</string>
<key>IS_ADS_ENABLED</key>
<false></false>
<key>IS_ANALYTICS_ENABLED</key>
Expand Down
27 changes: 21 additions & 6 deletions lib/application/account/account_notifier.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import 'dart:async';

import 'package:aewallet/application/api_service.dart';
import 'package:aewallet/application/app_service.dart';
import 'package:aewallet/application/nft/nft.dart';
import 'package:aewallet/application/refresh_in_progress.dart';
Expand All @@ -12,6 +13,7 @@ import 'package:aewallet/model/data/account.dart';
import 'package:aewallet/model/data/account_balance.dart';
import 'package:aewallet/modules/aeswap/application/pool/dex_pool.dart';
import 'package:aewallet/modules/aeswap/application/session/provider.dart';
import 'package:aewallet/util/pubkey_util.dart';
import 'package:archethic_dapp_framework_flutter/archethic_dapp_framework_flutter.dart'
as aedappfm;
import 'package:archethic_lib_dart/archethic_lib_dart.dart';
Expand Down Expand Up @@ -240,12 +242,6 @@ class AccountNotifier extends _$AccountNotifier {
_RefreshOperation get _updateRecentTransactionsOperation => (
name: 'Recent Transactions',
operation: (Account account) async {
// TODO(dev): Supp ?
/* ref.invalidate(
recentTransactionsProvider(
account.genesisAddress,
),
);*/
return account;
},
);
Expand Down Expand Up @@ -347,4 +343,23 @@ class AccountNotifier extends _$AccountNotifier {
return false;
}
}

Future<void> fetchMissingGenesisPubliKey() async {
await update((account) async {
if (account == null) return null;
if (account.publicKey != null && account.publicKey!.isNotEmpty) {
return account;
}

final apiService = ref.read(apiServiceProvider);

final accountPubKey = await PubKeyUtil.getGenesisPublicKey(
account.genesisAddress,
apiService,
);
final updatedAccount = account.copyWith(publicKey: accountPubKey);
await _saveLocally(updatedAccount);
return updatedAccount;
});
}
}
2 changes: 1 addition & 1 deletion lib/application/account/account_notifier.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions lib/application/account/accounts.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ Future<Account?> accountWithGenesisAddress(
return accounts.getAccountWithGenesisAddress(addressToSearch);
}

@riverpod
Future<Account?> accountWithPubKey(Ref ref, String pubKey) async {
final accounts = await ref.watch(accountsNotifierProvider.future);
return accounts.getAccountWithPubKey(pubKey);
}

@riverpod
Future<Account?> accountWithName(
Ref ref,
Expand Down
131 changes: 131 additions & 0 deletions lib/application/account/accounts.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading