This commit is contained in:
2022-10-20 17:39:17 +08:00
parent 0a81762ba1
commit 30a9279ff1
8 changed files with 134 additions and 18 deletions

View File

@@ -18,6 +18,11 @@ class _AuthImportPageState extends State<AuthImportPage> {
@override
void initState() {
super.initState();
setState(() {
_editingController.text =
'demise sell awesome tragic faith village party elbow lady leopard wrestle civil';
});
}
@override
@@ -49,12 +54,14 @@ class _AuthImportPageState extends State<AuthImportPage> {
),
const Text('支持导入所有遵循BIP标准生成的助记词'),
ElevatedButton(
onPressed: () {
onPressed: () async {
String? address =
HDWallet.mnemonicToAddress(_editingController.text);
if (address != null) {
AuthService.to.login(address);
Get.offAllNamed(AppRoutes.app);
var result = await AuthService.to.login(address);
if (result) {
Get.offAllNamed(AppRoutes.app);
}
}
},
child: const Text('开始导入'),