spl_token

Function ui_amount_to_amount

Source
pub fn ui_amount_to_amount(ui_amount: f64, decimals: u8) -> u64
Expand description

Convert the UI representation of a token amount (using the decimals field defined in its mint) to the raw amount