Function amount_to_ui_amount

Source
pub fn amount_to_ui_amount(amount: u64, decimals: u8) -> String
Expand description

Convert raw token amount to UI amount based on decimals

Uses pure integer arithmetic to avoid floating-point precision errors. This is safer for financial calculations where precision is critical.