Skip to content

Commit

Permalink
Put back on CDF currency (#130)
Browse files Browse the repository at this point in the history
* KYC save data

* KYC save his data

* Module to check KYC field

* Module to check KYC field

* Add Waiting List module

* Module for waiting

* fix tests

* Finished Waiting list

* Finished contact form

* Finish module for blog

* Change all links wiiqare-app.com to app.wiiqare.com

* Change link of wiiqare platform

* Finish module to get voucher without stripe webhook

* Change id stripe payment

* Change name endpoint

* Add comment modules

* Comment form it's working now

* Finish with generate voucher module

* transaction

* Add country field

* Change CDF to XOF

* Return CDF

* Change to XOF

* Put back to CDF currency

---------

Co-authored-by: Abhishek Shandilya <[email protected]>
Co-authored-by: bienvenu Zigabe <[email protected]>
  • Loading branch information
3 people authored Feb 12, 2024
1 parent 9107c29 commit 0faf2c8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
4 changes: 3 additions & 1 deletion src/modules/provider-svc/provider-svc.service.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,9 @@ describe('ProviderService', () => {
);
});

it('should throw an error if the voucher currency is not XOF', async () => {

it('should throw an error if the voucher currency is not CDF', async () => {

transactionRepository.findOne = jest.fn().mockResolvedValue({ ...mockTransaction, currency: 'USD' });

await expect(
Expand Down
12 changes: 6 additions & 6 deletions src/modules/provider-svc/provider-svc.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -319,14 +319,14 @@ export class ProviderService {
const firstVoucher = {
amount: Math.round(serviceTotal),
ownerId: transaction.senderId,
currency: 'XOF',
currency: 'CDF',
patientId: transaction.ownerId
}

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

Expand Down Expand Up @@ -438,9 +438,9 @@ export class ProviderService {
//save first transaction split
const transactionToSave1 = this.transactionRepository.create({
senderAmount: firstVoucher.amount,
senderCurrency: 'XOF',
senderCurrency: 'CDF',
amount: firstVoucher.amount,
currency: 'XOF',
currency: 'CDF',
conversionRate: 0,
senderId: transaction.senderId,
ownerId: transaction.ownerId,
Expand Down Expand Up @@ -473,9 +473,9 @@ export class ProviderService {
//save second transaction split
const transactionToSave2 = this.transactionRepository.create({
senderAmount: secondVoucher.amount,
senderCurrency: 'XOF',
senderCurrency: 'CDF',
amount: secondVoucher.amount,
currency: 'XOF',
currency: 'CDF',
conversionRate: 0,
senderId: transaction.senderId,
ownerId: transaction.ownerId,
Expand Down

0 comments on commit 0faf2c8

Please sign in to comment.