mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-02 21:07:58 +08:00
fix(connector): fix amount conversion incase of minor unit (#2793)
Co-authored-by: preetamrevankar <132073736+preetamrevankar@users.noreply.github.com>
This commit is contained in:
@ -1077,7 +1077,7 @@ pub fn get_amount_as_string(
|
||||
currency: diesel_models::enums::Currency,
|
||||
) -> Result<String, error_stack::Report<errors::ConnectorError>> {
|
||||
let amount = match currency_unit {
|
||||
types::api::CurrencyUnit::Minor => to_currency_lower_unit(amount.to_string(), currency)?,
|
||||
types::api::CurrencyUnit::Minor => amount.to_string(),
|
||||
types::api::CurrencyUnit::Base => to_currency_base_unit(amount, currency)?,
|
||||
};
|
||||
Ok(amount)
|
||||
|
||||
Reference in New Issue
Block a user