Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions packages/rs-platform-wallet/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,23 @@ pub enum PlatformWalletError {
#[error("Asset lock transaction failed: {0}")]
AssetLockTransaction(String),

/// Asset-lock coin selection could not raise the requested amount from
/// the wallet's spendable Core funds. Carries the exact `available` and
/// `required` duff amounts the coin selector reported so callers (and the
/// UI) can render a precise shortfall instead of a stringly-typed
/// "Insufficient funds" message.
///
/// After dashpay/platform#4073 the `available` figure reflects the UNION
/// of every spendable funds account (BIP44 + BIP32 + CoinJoin + DashPay)
/// for shielded funding, not just the primary BIP44 slice — so a genuine
/// shortfall here means the whole wallet is short, not that funds are
/// stranded on an unreachable derivation account.
#[error(
"asset lock coin selection is short: available {available} duffs, \
required {required} duffs"
)]
AssetLockInsufficientFunds { available: u64, required: u64 },

#[error("Transaction broadcast failed: {0}")]
TransactionBroadcast(String),

Expand Down
Loading
Loading