Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handling mempool min fee not met error #135

Open
saiy2k opened this issue Jun 18, 2024 · 0 comments
Open

Handling mempool min fee not met error #135

saiy2k opened this issue Jun 18, 2024 · 0 comments

Comments

@saiy2k
Copy link

saiy2k commented Jun 18, 2024

bdk version: 0.31.2-dev.1

With the following code:

try {
  [...]
  await builder.feeRate(0).addRecipient(script, 900).finish(bdkWallet);
} on FeeTooLowException catch (e) {
  print('FeeTooLowException');
  print(e);
} on FeeRateTooLowException catch (e) {
  print('FeeRateTooLowException');
  print(e);
} on RpcException catch (e) {
  print('RpcException');
  print(e);
} on Exception catch (e) {
  print('Exception');
  print(e);
}

No typed Exception is being thrown.

There are typed Exceptions like FeeTooLowException, FeeRateTooLowException (or) since it looks like an RPC error, RpcException could be thrown.

The log goes as follows:
BdkError.electrum(field0: Electrum server error: "sendrawtransaction RPC error: {\"code\":-26,\"message\":\"mempool min fee not met, 0 < 13169\"}")

Basically I am trying to get the JSON object {\"code\":-26,\"message\":\"mempool min fee not met, 0 < 13169\"}") embedded inside the error string.

To simulate the issue:
https://github.com/saiy2k/Bdk-flutter-Exception-handler

Run the app and press the + floating action button.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant