Skip to content

Commit

Permalink
fix(primitives): Clarified the error message for the lacking balance (#…
Browse files Browse the repository at this point in the history
…3625)

Co-authored-by: Bowen Wang <[email protected]>
  • Loading branch information
frol and bowenwang1996 authored Nov 18, 2020
1 parent 7530622 commit f3ba9f9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/primitives/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ impl Display for InvalidTxError {
signer_id, balance, cost
),
InvalidTxError::LackBalanceForState { signer_id, amount } => {
write!(f, "Failed to execute, because the account {:?} wouldn't have enough balance to cover storage, required to have {}", signer_id, amount)
write!(f, "Failed to execute, because the account {:?} wouldn't have enough balance to cover storage, required to have {} yoctoNEAR more", signer_id, amount)
}
InvalidTxError::CostOverflow => {
write!(f, "Transaction gas or balance cost is too high")
Expand Down Expand Up @@ -635,7 +635,7 @@ impl Display for ActionErrorKind {
),
ActionErrorKind::LackBalanceForState { account_id, amount } => write!(
f,
"The account {} wouldn't have enough balance to cover storage, required to have {}",
"The account {} wouldn't have enough balance to cover storage, required to have {} yoctoNEAR more",
account_id, amount
),
ActionErrorKind::TriesToUnstake { account_id } => {
Expand Down

0 comments on commit f3ba9f9

Please sign in to comment.