pub fn may_pay(info: &MessageInfo, denom: &str) -> Result<Uint128, PaymentError>
Expand description

Similar to must_pay, but it any payment is optional. Returns an error if a different denom was sent. Otherwise, returns the amount of denom sent, or 0 if nothing sent.