hasSufficientBalance method

bool hasSufficientBalance(
  1. WalletState state,
  2. BigInt requiredAmount
)

Whether selectUTXOsForAmount can cover requiredAmount: WalletState.availableBalance, the total of the UTXOs it may select, is at least requiredAmount. Fees are the caller's to add.

Implementation

bool hasSufficientBalance(WalletState state, BigInt requiredAmount) {
  return state.availableBalance >= requiredAmount;
}