Skip to content

Commit

Permalink
added math.round() to voucher mint (#102)
Browse files Browse the repository at this point in the history
  • Loading branch information
artweb11 authored Oct 17, 2023
1 parent aac79fe commit 0c94a9e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/modules/provider-svc/provider-svc.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ export class ProviderService {
);
}

const voucherValueInCDF = voucher.value;
const voucherValueInCDF = Math.round( voucher.value );

// console.log('aight', serviceTotal, voucher.value, voucher.vid );
//if services value is smaller than voucher
Expand All @@ -313,14 +313,14 @@ export class ProviderService {
// string status;

const firstVoucher = {
amount: serviceTotal,
amount: Math.round( serviceTotal ),
ownerId: transaction.senderId,
currency: 'CDF',
patientId: transaction.ownerId
}

const secondVoucher = {
amount: (voucherValueInCDF - serviceTotal),
amount: (voucherValueInCDF - Math.round(serviceTotal)),
ownerId: transaction.senderId,
currency: 'CDF',
patientId: transaction.ownerId
Expand Down

0 comments on commit 0c94a9e

Please sign in to comment.