Skip to content

Commit

Permalink
Fix math round after conversion to cents
Browse files Browse the repository at this point in the history
  • Loading branch information
Ruben committed Dec 24, 2024
1 parent b8cfe43 commit 35920ee
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ export class IntersolveVisaApiService {
reference: string;
}): Promise<void> {
const uuid = generateUUIDFromSeed(reference);
const amountInCent = amountInMajorUnit * 100;
const amountInCent = Math.round(amountInMajorUnit * 100); // Math round is needed to prevent floating point errors

const transferRequestDto: TransferRequestIntersolveApiDto = {
quantity: {
Expand Down

0 comments on commit 35920ee

Please sign in to comment.