Skip to content

Commit

Permalink
fix: cast to f64 before division
Browse files Browse the repository at this point in the history
  • Loading branch information
ilbertt committed May 19, 2024
1 parent 0284868 commit 78530e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/backend/src/api/services/ledger_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ impl LedgerService {
"orchestrator is not the recipient of the payment",
));
}
let paid_akt = (amount.e8s() / Tokens::SUBDIVIDABLE_BY) as f64
let paid_akt = (amount.e8s() as f64 / Tokens::SUBDIVIDABLE_BY as f64)
* self.get_icp_2_akt_conversion_rate().await?;

// the payment might still be a double spend,
Expand Down

0 comments on commit 78530e3

Please sign in to comment.