Show error message / ledger import

This commit is contained in:
Hanh 2023-05-10 17:55:25 +10:00
parent 210ecee2f4
commit 4cffa9d391
2 changed files with 9 additions and 5 deletions

View File

@ -235,10 +235,14 @@ class _AddAccountPageState extends State<AddAccountPage> {
}
_importLedger() async {
final account =
await WarpApi.importFromLedger(active.coin, _nameController.text);
active.setActiveAccount(_coin, account);
Navigator.of(context).pushReplacementNamed("/account");
try {
final account =
await WarpApi.importFromLedger(active.coin, _nameController.text);
active.setActiveAccount(_coin, account);
Navigator.of(context).pushReplacementNamed("/account");
} on String catch (msg) {
showSnackBar(msg, error: true);
}
}
}

View File

@ -15,7 +15,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 1.4.0+436
version: 1.4.0+437
environment:
sdk: ">=2.12.0 <3.0.0"