spl_token_2022

Function try_ui_amount_into_amount

Source
pub fn try_ui_amount_into_amount(
    ui_amount: String,
    decimals: u8,
) -> Result<u64, ProgramError>
Expand description

Try to convert a UI representation of a token amount to its raw amount using the given decimals field