pub fn has_coins(coins: &[Coin], required: &Coin) -> bool
has_coins returns true if the list of coins has at least the required amount