Skip to content

Commit

Permalink
handled feeRateEstimation exception
Browse files Browse the repository at this point in the history
  • Loading branch information
BitcoinZavior committed Jun 3, 2024
1 parent 60a6133 commit ac2627f
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions lib/src/root.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,13 @@ import 'generated/api/node.dart';
class Mnemonic extends LdkMnemonic {
Mnemonic({required super.seedPhrase});
static Future<Mnemonic> generate() async {
await Frb.verifyInit();
final res = await LdkMnemonic.generate();
return Mnemonic(seedPhrase: res.seedPhrase);
try {
await Frb.verifyInit();
final res = await LdkMnemonic.generate();
return Mnemonic(seedPhrase: res.seedPhrase);
} on error.NodeException catch (e) {
throw mapNodeException(e);
}
}
}

Expand Down Expand Up @@ -627,6 +631,8 @@ class Builder {
return Node._(ptr: res.ptr);
} on error.BuilderException catch (e) {
throw mapBuilderException(e);
} on error.NodeException catch (e) {
throw mapNodeException(e);
}
}
}

0 comments on commit ac2627f

Please sign in to comment.