improve paste mnemonic button; set numberScan to 20

This commit is contained in:
poka 2022-06-07 22:16:56 +02:00
parent 263b99fb95
commit b7817a3299
3 changed files with 31 additions and 21 deletions

View File

@ -366,7 +366,7 @@ class GenerateWalletsProvider with ChangeNotifier {
}
Future<bool> scanDerivations(BuildContext context,
{int numberScan = 10}) async {
{int numberScan = 20}) async {
SubstrateSdk _sub = Provider.of<SubstrateSdk>(context, listen: false);
final ss58 = _sub.ss58;
final currentChestNumber = configBox.get('currentChest');

View File

@ -102,8 +102,10 @@ class RestoreChest extends StatelessWidget {
context,
FaderTransition(
page: skipIntro
? const OnboardingStepNine(scanDerivation: true)
: const OnboardingStepSeven(scanDerivation: true),
? const OnboardingStepNine(
scanDerivation: true)
: const OnboardingStepSeven(
scanDerivation: true),
isFast: true),
);
} else {
@ -123,24 +125,32 @@ class RestoreChest extends StatelessWidget {
Column(children: [
const SizedBox(height: 20),
SizedBox(
width: 150,
height: 50,
width: 190,
height: 60,
child: ElevatedButton(
style: ElevatedButton.styleFrom(
elevation: 4,
primary: yellowC, // background
onPrimary: Colors.black, // foreground
),
onPressed: () {
genW.pasteMnemonic(context);
},
child: const Text(
'Coller depuis le\npresse-papier',
textAlign: TextAlign.center,
style:
TextStyle(fontSize: 16, fontWeight: FontWeight.w400),
),
),
style: ElevatedButton.styleFrom(
elevation: 4,
primary: yellowC, // background
onPrimary: Colors.black, // foreground
),
onPressed: () {
genW.pasteMnemonic(context);
},
child: Row(
children: const [
Icon(
Icons.content_paste_go,
size: 25,
),
SizedBox(width: 10),
Text(
'Coller depuis le\npresse-papier',
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 17, fontWeight: FontWeight.w400),
),
],
)),
)
])
]),

View File

@ -173,7 +173,7 @@ class OnboardingStepTen extends StatelessWidget {
bool isAlive = false;
if (scanDerivation) {
isAlive = await _generateWalletProvider
.scanDerivations(context, numberScan: 30);
.scanDerivations(context, numberScan: 20);
}
if (!isAlive) {
final address = await _sub.importAccount(