improve paste mnemonic button; set numberScan to 20
This commit is contained in:
parent
263b99fb95
commit
b7817a3299
|
@ -366,7 +366,7 @@ class GenerateWalletsProvider with ChangeNotifier {
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<bool> scanDerivations(BuildContext context,
|
Future<bool> scanDerivations(BuildContext context,
|
||||||
{int numberScan = 10}) async {
|
{int numberScan = 20}) async {
|
||||||
SubstrateSdk _sub = Provider.of<SubstrateSdk>(context, listen: false);
|
SubstrateSdk _sub = Provider.of<SubstrateSdk>(context, listen: false);
|
||||||
final ss58 = _sub.ss58;
|
final ss58 = _sub.ss58;
|
||||||
final currentChestNumber = configBox.get('currentChest');
|
final currentChestNumber = configBox.get('currentChest');
|
||||||
|
|
|
@ -102,8 +102,10 @@ class RestoreChest extends StatelessWidget {
|
||||||
context,
|
context,
|
||||||
FaderTransition(
|
FaderTransition(
|
||||||
page: skipIntro
|
page: skipIntro
|
||||||
? const OnboardingStepNine(scanDerivation: true)
|
? const OnboardingStepNine(
|
||||||
: const OnboardingStepSeven(scanDerivation: true),
|
scanDerivation: true)
|
||||||
|
: const OnboardingStepSeven(
|
||||||
|
scanDerivation: true),
|
||||||
isFast: true),
|
isFast: true),
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
|
@ -123,24 +125,32 @@ class RestoreChest extends StatelessWidget {
|
||||||
Column(children: [
|
Column(children: [
|
||||||
const SizedBox(height: 20),
|
const SizedBox(height: 20),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: 150,
|
width: 190,
|
||||||
height: 50,
|
height: 60,
|
||||||
child: ElevatedButton(
|
child: ElevatedButton(
|
||||||
style: ElevatedButton.styleFrom(
|
style: ElevatedButton.styleFrom(
|
||||||
elevation: 4,
|
elevation: 4,
|
||||||
primary: yellowC, // background
|
primary: yellowC, // background
|
||||||
onPrimary: Colors.black, // foreground
|
onPrimary: Colors.black, // foreground
|
||||||
),
|
),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
genW.pasteMnemonic(context);
|
genW.pasteMnemonic(context);
|
||||||
},
|
},
|
||||||
child: const Text(
|
child: Row(
|
||||||
'Coller depuis le\npresse-papier',
|
children: const [
|
||||||
textAlign: TextAlign.center,
|
Icon(
|
||||||
style:
|
Icons.content_paste_go,
|
||||||
TextStyle(fontSize: 16, fontWeight: FontWeight.w400),
|
size: 25,
|
||||||
),
|
),
|
||||||
),
|
SizedBox(width: 10),
|
||||||
|
Text(
|
||||||
|
'Coller depuis le\npresse-papier',
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 17, fontWeight: FontWeight.w400),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
)),
|
||||||
)
|
)
|
||||||
])
|
])
|
||||||
]),
|
]),
|
||||||
|
|
|
@ -173,7 +173,7 @@ class OnboardingStepTen extends StatelessWidget {
|
||||||
bool isAlive = false;
|
bool isAlive = false;
|
||||||
if (scanDerivation) {
|
if (scanDerivation) {
|
||||||
isAlive = await _generateWalletProvider
|
isAlive = await _generateWalletProvider
|
||||||
.scanDerivations(context, numberScan: 30);
|
.scanDerivations(context, numberScan: 20);
|
||||||
}
|
}
|
||||||
if (!isAlive) {
|
if (!isAlive) {
|
||||||
final address = await _sub.importAccount(
|
final address = await _sub.importAccount(
|
||||||
|
|
Loading…
Reference in New Issue