Skip to content

Commit

Permalink
wallet - better err msg for insufficient funds error
Browse files Browse the repository at this point in the history
  • Loading branch information
elnosh committed Aug 16, 2024
1 parent 22dd85f commit 86e07b0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion wallet/wallet.go
Original file line number Diff line number Diff line change
Expand Up @@ -861,7 +861,9 @@ func (w *Wallet) selectProofsToSend(
}

if selectedProofsSum < amount+fees {
return nil, ErrInsufficientMintBalance
return nil, fmt.Errorf(
"insufficient funds for transaction. Amount needed %v + %v(fees) = %v",
amount, fees, amount+fees)
}

return selectedProofs, nil
Expand Down

0 comments on commit 86e07b0

Please sign in to comment.