Skip to content

Commit

Permalink
🐛 Fix migration tool
Browse files Browse the repository at this point in the history
  • Loading branch information
redDwarf03 committed Mar 15, 2024
1 parent 3a0aa4f commit 8b7c2b7
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,12 @@

part of 'migration_manager.dart';

final migration_492 = LocalDataMigration(
minAppVersion: 492,
final migration_512 = LocalDataMigration(
minAppVersion: 512,
run: (ref) async {
// We need to get the genesis address for contact's list
// https://github.com/archethic-foundation/archethic-wallet/issues/887
if (ref.read(SessionProviders.session).isLoggedOut) {
log(
'Skipping migration 492 process : user logged out.',
name: logName,
);
return;
}

final contacts = await ref.read(
ContactProviders.fetchContacts().future,
);
Expand Down
3 changes: 2 additions & 1 deletion lib/application/migrations/migration_manager.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import 'package:package_info_plus/package_info_plus.dart';
import 'package:riverpod_annotation/riverpod_annotation.dart';

part '437.dart';
part '492.dart';
part '512.dart';
part 'migration_manager.freezed.dart';
part 'migration_manager.g.dart';

Expand Down Expand Up @@ -119,6 +119,7 @@ class LocalDataMigration {
@riverpod
List<LocalDataMigration> _migrations(_MigrationsRef ref) => [
migration_437,
migration_512,
];

class CurrentVersionRepository {
Expand Down
2 changes: 1 addition & 1 deletion lib/application/migrations/migration_manager.g.dart

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

2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: Fully decentralized and cryptocurrency non-custodial hot wallet tha

publish_to: "none" # Remove this line if you wish to publish to pub.dev

version: 2.3.4+508
version: 2.3.5+511

environment:
sdk: ">=3.3.0 <4.0.0"
Expand Down

0 comments on commit 8b7c2b7

Please sign in to comment.