diff --git a/assets/translations/fr.json b/assets/translations/fr.json index 26b93ad..ba9d0f5 100644 --- a/assets/translations/fr.json +++ b/assets/translations/fr.json @@ -178,7 +178,7 @@ "removeContact": "Supprimer\nce contact", "derivationsScanProgress": "Scan de l'adresse {}/{}", "youAreOffline": "Vous ĂȘtes hors ligne...", - "importG1v1": "Importer son compte G1v1", + "importG1v1": "Importer un ancien compte G1v1", "selectDestWallet": "SĂ©lectionnez un portefeuille cible:", "youMustWaitBeforeCashoutThisAccount": "Vous devez attendre {} minutes\navant de pouvoir migrer ce compte", "thisAccountIsEmpty": "Ce compte est vide", diff --git a/lib/screens/myWallets/import_g1_v1.dart b/lib/screens/myWallets/import_g1_v1.dart index 3833be9..0bb14fe 100644 --- a/lib/screens/myWallets/import_g1_v1.dart +++ b/lib/screens/myWallets/import_g1_v1.dart @@ -60,7 +60,25 @@ class ImportG1v1 extends StatelessWidget { builder: (BuildContext context, AsyncSnapshot status) { // log.d(_certs.data); - final Map balance = status.data?[0] ?? 0; + if (status.data == null) { + return Column(children: [ + const SizedBox(height: 80), + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + height: 35, + width: 35, + child: CircularProgressIndicator( + color: orangeC, + strokeWidth: 4, + ), + ), + ]), + ]); + } + + final Map balance = status.data?[0] ?? {}; final String idtyStatus = status.data?[1]; final String myIdtyStatus = status.data?[2]; final bool hasConsumer = status.data?[3] ?? false; @@ -154,16 +172,16 @@ class ImportG1v1 extends StatelessWidget { ), const SizedBox(height: 20), Text( - sub.g1V1NewAddress, + getShortPubkey(sub.g1V1NewAddress), style: const TextStyle( - fontSize: 14.0, + fontSize: 18, color: Colors.black, fontWeight: FontWeight.bold, fontFamily: 'Monospace'), ), const SizedBox(height: 20), Text( - '$balance $currencyName', + '${balance['transferableBalance']} $currencyName', style: const TextStyle(fontSize: 17), ), Row( @@ -240,8 +258,10 @@ class ImportG1v1 extends StatelessWidget { MaterialPageRoute(builder: (context) { return TransactionInProgress( transType: 'identityMigration', - fromAddress: sub.g1V1NewAddress, - toAddress: selectedWallet.address); + fromAddress: + getShortPubkey(sub.g1V1NewAddress), + toAddress: getShortPubkey( + selectedWallet.address!)); }), ); resetScreen(context); diff --git a/lib/screens/myWallets/migrate_identity.dart b/lib/screens/myWallets/migrate_identity.dart index 2bb0624..b8fa00d 100644 --- a/lib/screens/myWallets/migrate_identity.dart +++ b/lib/screens/myWallets/migrate_identity.dart @@ -223,8 +223,9 @@ class MigrateIdentityScreen extends StatelessWidget { MaterialPageRoute(builder: (context) { return TransactionInProgress( transType: 'identityMigration', - fromAddress: fromAddress, - toAddress: selectedWallet.address); + fromAddress: getShortPubkey(fromAddress), + toAddress: getShortPubkey( + selectedWallet.address!)); }), ); } diff --git a/lib/screens/myWallets/wallets_home.dart b/lib/screens/myWallets/wallets_home.dart index b288f65..19a324c 100644 --- a/lib/screens/myWallets/wallets_home.dart +++ b/lib/screens/myWallets/wallets_home.dart @@ -78,28 +78,6 @@ class WalletsHome extends StatelessWidget { BuildContext context, MyWalletsProvider myWalletProvider) { return Column(children: [ const SizedBox(height: 50), - InkWell( - key: const Key('importG1v1'), - onTap: () { - Navigator.push( - context, - MaterialPageRoute(builder: (context) { - return const ImportG1v1(); - }), - ); - }, - child: SizedBox( - width: 400, - height: 50, - child: Center( - child: Text('importG1v1'.tr(), - style: TextStyle( - fontSize: 22, - color: orangeC, - fontWeight: FontWeight.w500))), - ), - ), - const SizedBox(height: 30), SizedBox( height: 80, width: 420, @@ -129,6 +107,28 @@ class WalletsHome extends StatelessWidget { ), )), const SizedBox(height: 30), + InkWell( + key: const Key('importG1v1'), + onTap: () { + Navigator.push( + context, + MaterialPageRoute(builder: (context) { + return const ImportG1v1(); + }), + ); + }, + child: SizedBox( + width: 400, + height: 60, + child: Center( + child: Text('importG1v1'.tr(), + style: TextStyle( + fontSize: 22, + color: Colors.blue[900], + fontWeight: FontWeight.w500))), + ), + ), + const SizedBox(height: 5), InkWell( key: const Key('changeChest'), onTap: () { @@ -141,7 +141,7 @@ class WalletsHome extends StatelessWidget { }, child: SizedBox( width: 400, - height: 50, + height: 60, child: Center( child: Text('changeChest'.tr(), style: TextStyle( diff --git a/pubspec.yaml b/pubspec.yaml index 58d1deb..0be3548 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -5,7 +5,7 @@ description: Pay with G1. # pub.dev using `pub publish`. This is preferred for private packages. publish_to: 'none' # Remove this line if you wish to publish to pub.dev -version: 0.0.9+23 +version: 0.0.9+24 environment: sdk: '>=2.12.0 <3.0.0'