refactor(router): added a new type minor unit to amount (#4629)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
Co-authored-by: Hrithikesh <61539176+hrithikesh026@users.noreply.github.com>
This commit is contained in:
Sahkal Poddar
2024-05-21 15:40:05 +05:30
committed by GitHub
parent 2cd360e6a9
commit 443b7e6ea2
61 changed files with 679 additions and 436 deletions

View File

@ -174,7 +174,7 @@ pub async fn generate_sample_data(
true => common_enums::IntentStatus::Failed,
_ => common_enums::IntentStatus::Succeeded,
},
amount: amount * 100,
amount: common_utils::types::MinorUnit::new(amount * 100),
currency: Some(
*currency_vec
.get((num - 1) % currency_vec_len)
@ -192,7 +192,7 @@ pub async fn generate_sample_data(
),
attempt_count: 1,
customer_id: Some("hs-dashboard-user".to_string()),
amount_captured: Some(amount * 100),
amount_captured: Some(common_utils::types::MinorUnit::new(amount * 100)),
profile_id: Some(profile_id.clone()),
return_url: Default::default(),
metadata: Default::default(),