diff --git a/src/modules/payment-svc/payment-swap-svc.service.ts b/src/modules/payment-svc/payment-swap-svc.service.ts index ad63c9f..2d24e35 100644 --- a/src/modules/payment-svc/payment-swap-svc.service.ts +++ b/src/modules/payment-svc/payment-swap-svc.service.ts @@ -28,7 +28,7 @@ export class PaymentSwapService { senderId: randomUUID(), patientId: randomUUID(), currencyPatientAmount: 100, - currencyPatient: 'CDF', + currencyPatient: 'XOF', currencyRate: 1.0, }, }, diff --git a/src/modules/provider-svc/provider-svc.service.test.ts b/src/modules/provider-svc/provider-svc.service.test.ts index 2ca9ce0..8abda66 100644 --- a/src/modules/provider-svc/provider-svc.service.test.ts +++ b/src/modules/provider-svc/provider-svc.service.test.ts @@ -118,7 +118,7 @@ describe('ProviderService', () => { senderCurrency: 'senderCurrency', amount: 1000, conversionRate: 1, - currency: 'CDF', + currency: 'XOF', senderId: 'senderId', ownerId: 'ownerId', hospitalId: null, @@ -491,7 +491,9 @@ describe('ProviderService', () => { ); }); + it('should throw an error if the voucher currency is not CDF', async () => { + transactionRepository.findOne = jest.fn().mockResolvedValue({ ...mockTransaction, currency: 'USD' }); await expect( @@ -522,7 +524,7 @@ describe('ProviderService', () => { transactionHash: 'hash1', returnValues: { '0': 1, - '1': [100, 'CDF', 'ownerId', 'hospitalId', 'patientId', 'UNCLAIMED'] + '1': [100, 'XOF', 'ownerId', 'hospitalId', 'patientId', 'UNCLAIMED'] } } }