Skip to content

Commit

Permalink
Improve insufficient funds error (#1656)
Browse files Browse the repository at this point in the history
* Improve insufficient funds error

* nits

* Use base unit

* Update sdk/src/wallet/error.rs
  • Loading branch information
thibault-martinez authored Nov 22, 2023
1 parent 14a86f3 commit 24f1057
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- `Account::prepare_claim_outputs` method;

### Changed

- Display of `WalletError::InsufficientFunds`;

## 1.1.2 - 2023-10-26

### Added
Expand Down
2 changes: 1 addition & 1 deletion sdk/src/wallet/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ pub enum Error {
#[error("failed to get remainder address")]
FailedToGetRemainder,
/// Insufficient funds to send transaction.
#[error("insufficient funds {available}/{required} available")]
#[error("address owns insufficient funds: {required} base unit required, but {available} base unit available")]
InsufficientFunds { available: u64, required: u64 },
/// Invalid coin type, all accounts need to have the same coin type
#[error("invalid coin type for new account: {new_coin_type}, existing coin type is: {existing_coin_type}")]
Expand Down

0 comments on commit 24f1057

Please sign in to comment.