improve migration text infos
This commit is contained in:
parent
164fc16ed8
commit
776a0f8c75
|
@ -178,7 +178,7 @@
|
||||||
"youAreOffline": "You are offline...",
|
"youAreOffline": "You are offline...",
|
||||||
"importG1v1": "Import old G1v1 account",
|
"importG1v1": "Import old G1v1 account",
|
||||||
"selectDestWallet": "Select a target wallet:",
|
"selectDestWallet": "Select a target wallet:",
|
||||||
"youMustWaitBeforeCashoutThisAccount": "You have to wait {} minutes\nbefore migrate this account",
|
"youMustWaitBeforeCashoutThisAccount": "You have to wait a few moment before migrate this account",
|
||||||
"thisAccountIsEmpty": "This account is empty",
|
"thisAccountIsEmpty": "This account is empty",
|
||||||
"youCannotMigrateIdentityToExistingIdentity": "You cannot migrate an identity\nto an account that already has an identity",
|
"youCannotMigrateIdentityToExistingIdentity": "You cannot migrate an identity\nto an account that already has an identity",
|
||||||
"importOldAccount": "Import your old account",
|
"importOldAccount": "Import your old account",
|
||||||
|
|
|
@ -178,7 +178,7 @@
|
||||||
"youAreOffline": "You are offline...",
|
"youAreOffline": "You are offline...",
|
||||||
"importG1v1": "Import old G1v1 account",
|
"importG1v1": "Import old G1v1 account",
|
||||||
"selectDestWallet": "Select a target wallet:",
|
"selectDestWallet": "Select a target wallet:",
|
||||||
"youMustWaitBeforeCashoutThisAccount": "You have to wait {} minutes\nbefore migrate this account",
|
"youMustWaitBeforeCashoutThisAccount": "You have to wait a few moment before migrate this account",
|
||||||
"thisAccountIsEmpty": "This account is empty",
|
"thisAccountIsEmpty": "This account is empty",
|
||||||
"youCannotMigrateIdentityToExistingIdentity": "You cannot migrate an identity\nto an account that already has an identity",
|
"youCannotMigrateIdentityToExistingIdentity": "You cannot migrate an identity\nto an account that already has an identity",
|
||||||
"importOldAccount": "Import your old account",
|
"importOldAccount": "Import your old account",
|
||||||
|
|
|
@ -179,7 +179,7 @@
|
||||||
"youAreOffline": "Vous êtes hors ligne...",
|
"youAreOffline": "Vous êtes hors ligne...",
|
||||||
"importG1v1": "Importer un ancien compte G1v1",
|
"importG1v1": "Importer un ancien compte G1v1",
|
||||||
"selectDestWallet": "Sélectionnez un portefeuille cible:",
|
"selectDestWallet": "Sélectionnez un portefeuille cible:",
|
||||||
"youMustWaitBeforeCashoutThisAccount": "Vous devez attendre {} minutes\navant de pouvoir migrer ce compte",
|
"youMustWaitBeforeCashoutThisAccount": "Vous devez attendre quelques minutes avant de pouvoir migrer ce compte",
|
||||||
"thisAccountIsEmpty": "Ce compte est vide",
|
"thisAccountIsEmpty": "Ce compte est vide",
|
||||||
"youCannotMigrateIdentityToExistingIdentity": "Vous ne pouvez pas migrer une identité\nvers un compte disposant déjà d'une identité",
|
"youCannotMigrateIdentityToExistingIdentity": "Vous ne pouvez pas migrer une identité\nvers un compte disposant déjà d'une identité",
|
||||||
"importOldAccount": "Importer son ancien compte",
|
"importOldAccount": "Importer son ancien compte",
|
||||||
|
|
|
@ -46,8 +46,22 @@ void main() async {
|
||||||
|
|
||||||
// Check test1 cannot be revoked
|
// Check test1 cannot be revoked
|
||||||
await goBack();
|
await goBack();
|
||||||
await tapKey(keyOpenWallet(test1.address));
|
await tapKey(keyAddDerivation);
|
||||||
|
await tapKey(keyOpenWallet(test1.address), duration: 500);
|
||||||
await tapKey(keyManageMembership, duration: 1000);
|
await tapKey(keyManageMembership, duration: 1000);
|
||||||
await waitFor('Vous ne pouvez pas révoquer cette identité');
|
await waitFor('Vous ne pouvez pas révoquer cette identité');
|
||||||
|
|
||||||
|
// // Try migrate test1 identity to test6 address
|
||||||
|
// await tapKey(keyMigrateIdentity);
|
||||||
|
// await tapKey(keySelectWallet);
|
||||||
|
// await tapKey(keySelectThisWallet(test6.address), selectLast: true);
|
||||||
|
// await spawnBlock(number: 100);
|
||||||
|
// await waitFor('Vous devez attendre', reverse: true);
|
||||||
|
// await waitForButtonEnabled(keyConfirm);
|
||||||
|
// await tapKey(keyConfirm, duration: 500);
|
||||||
|
// await spawnBlock(duration: 2000);
|
||||||
|
// await waitFor('validé !');
|
||||||
|
// await tapKey(keyCloseTransactionScreen, duration: 0);
|
||||||
|
// await sleep(5000);
|
||||||
}, timeout: testTimeout());
|
}, timeout: testTimeout());
|
||||||
}
|
}
|
||||||
|
|
|
@ -135,9 +135,11 @@ Future<void> waitFor(String text,
|
||||||
Finder finder = exactMatch ? find.text(text) : find.textContaining(text);
|
Finder finder = exactMatch ? find.text(text) : find.textContaining(text);
|
||||||
log.d('INTEGRATION TEST: Wait for: $text');
|
log.d('INTEGRATION TEST: Wait for: $text');
|
||||||
|
|
||||||
|
final String searchType = reverse ? 'reversed text' : 'text';
|
||||||
|
|
||||||
do {
|
do {
|
||||||
if (DateTime.now().isAfter(end)) {
|
if (DateTime.now().isAfter(end)) {
|
||||||
throw Exception('Timed out waiting for text $text');
|
throw Exception('Timed out waiting for $searchType : "$text"');
|
||||||
}
|
}
|
||||||
|
|
||||||
await tester.pumpAndSettle();
|
await tester.pumpAndSettle();
|
||||||
|
|
|
@ -879,8 +879,6 @@ newKeySig: $newKeySig""");
|
||||||
final genesisHashString = await getGenesisHash();
|
final genesisHashString = await getGenesisHash();
|
||||||
final genesisHash = HEX.decode(genesisHashString.substring(2)) as Uint8List;
|
final genesisHash = HEX.decode(genesisHashString.substring(2)) as Uint8List;
|
||||||
final idtyIndexBytes = _int32bytes(idtyIndex);
|
final idtyIndexBytes = _int32bytes(idtyIndex);
|
||||||
// final pubkey = await addressToPubkey(address);
|
|
||||||
// final pubkeyHexa = '0x${HEX.encode(pubkey)}';
|
|
||||||
final messageToSign =
|
final messageToSign =
|
||||||
Uint8List.fromList(prefix + genesisHash + idtyIndexBytes);
|
Uint8List.fromList(prefix + genesisHash + idtyIndexBytes);
|
||||||
final revocationSig =
|
final revocationSig =
|
||||||
|
@ -893,10 +891,6 @@ newKeySig: $newKeySig""");
|
||||||
sender,
|
sender,
|
||||||
);
|
);
|
||||||
|
|
||||||
log.d('''DEBUGG: messageToSign: $messageToSign
|
|
||||||
revocationSig: $revocationSig
|
|
||||||
revocationSigTyped: $revocationSigTyped''');
|
|
||||||
|
|
||||||
final txOptions = [idtyIndex, address, revocationSigTyped];
|
final txOptions = [idtyIndex, address, revocationSigTyped];
|
||||||
return await _executeCall(txInfo, txOptions, password);
|
return await _executeCall(txInfo, txOptions, password);
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,6 +6,7 @@ import 'package:flutter_markdown/flutter_markdown.dart';
|
||||||
import 'package:gecko/globals.dart';
|
import 'package:gecko/globals.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:gecko/models/wallet_data.dart';
|
import 'package:gecko/models/wallet_data.dart';
|
||||||
|
import 'package:gecko/models/widgets_keys.dart';
|
||||||
import 'package:gecko/providers/duniter_indexer.dart';
|
import 'package:gecko/providers/duniter_indexer.dart';
|
||||||
import 'package:gecko/providers/my_wallets.dart';
|
import 'package:gecko/providers/my_wallets.dart';
|
||||||
import 'package:gecko/providers/substrate_sdk.dart';
|
import 'package:gecko/providers/substrate_sdk.dart';
|
||||||
|
@ -163,12 +164,14 @@ class MigrateIdentityScreen extends StatelessWidget {
|
||||||
Text('selectDestWallet'.tr()),
|
Text('selectDestWallet'.tr()),
|
||||||
const SizedBox(height: 5),
|
const SizedBox(height: 5),
|
||||||
DropdownButtonHideUnderline(
|
DropdownButtonHideUnderline(
|
||||||
|
key: keySelectWallet,
|
||||||
child: DropdownButton(
|
child: DropdownButton(
|
||||||
// alignment: AlignmentDirectional.topStart,
|
// alignment: AlignmentDirectional.topStart,
|
||||||
value: selectedWallet,
|
value: selectedWallet,
|
||||||
icon: const Icon(Icons.keyboard_arrow_down),
|
icon: const Icon(Icons.keyboard_arrow_down),
|
||||||
items: walletsList.map((wallet) {
|
items: walletsList.map((wallet) {
|
||||||
return DropdownMenuItem(
|
return DropdownMenuItem(
|
||||||
|
key: keySelectThisWallet(wallet.address!),
|
||||||
value: wallet,
|
value: wallet,
|
||||||
child: Text(
|
child: Text(
|
||||||
wallet.name!,
|
wallet.name!,
|
||||||
|
@ -187,6 +190,7 @@ class MigrateIdentityScreen extends StatelessWidget {
|
||||||
width: 380 * ratio,
|
width: 380 * ratio,
|
||||||
height: 60 * ratio,
|
height: 60 * ratio,
|
||||||
child: ElevatedButton(
|
child: ElevatedButton(
|
||||||
|
key: keyConfirm,
|
||||||
style: ElevatedButton.styleFrom(
|
style: ElevatedButton.styleFrom(
|
||||||
foregroundColor: Colors.white, elevation: 4,
|
foregroundColor: Colors.white, elevation: 4,
|
||||||
backgroundColor: orangeC, // foreground
|
backgroundColor: orangeC, // foreground
|
||||||
|
|
Loading…
Reference in New Issue