mars-protocol/contracts

remove helper function `get_denom_amount_from_coins` as the same functionality is already provided by a core cosmwasm library

Closed this issue · 1 comments

currently, Red Bank uses a helper function get_denom_amount_from_coins to find the amount of coins sent with an execute msg:

https://github.com/mars-protocol/outposts/blob/03b96e6ab6687b56cd5054e8fcf36c4ad00bb96b/contracts/mars-red-bank/src/helpers.rs#L8-L17

however, the same functionality is already provided by the cw-utils package found in cw-plus: https://github.com/CosmWasm/cw-plus/blob/main/packages/utils/src/payment.rs#L30-L39

imo, if a functionality is already provided by a core cosmwasm library, we should just use it instead of reinventing the wheel.

if a functionality is already provided by a core cosmwasm library, we should just use it instead of reinventing the whee -> agree