@mojaloop/sdk-scheme-adapter 24.10.9-snapshot.2 → 24.11.0-csi-1680.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -956,7 +956,7 @@ class InboundTransfersModel {
956
956
  async sendFxPutNotificationToBackend(body, conversionId) {
957
957
  const log = this._logger.child({ conversionId });
958
958
  try {
959
- log.verbose('sendFxPutNotificationToBackend incoming payload: ', { body });
959
+ log.verbose('sendFxPutNotificationToBackend - incoming payload: ', { body });
960
960
  this.data = await this.loadFxState(conversionId);
961
961
 
962
962
  if(!this.data) {
@@ -978,9 +978,9 @@ class InboundTransfersModel {
978
978
 
979
979
  const responseBody = {
980
980
  conversionState: body.conversionState, // one of ABORTED, COMMITTED, RESERVED
981
- completedTimestamp: new Date().toISOString(), // todo: get from body
981
+ completedTimestamp: body.completedTimestamp
982
982
  };
983
- log.verbose('sendFxPutNotificationToBackend sent body: ', { responseBody });
983
+ log.verbose('sendFxPutNotificationToBackend - body sent to cc: ', { responseBody });
984
984
 
985
985
 
986
986
  const res = await this._backendRequests.putFxTransfersNotification(responseBody, conversionId);
@@ -873,8 +873,7 @@ describe('inboundModel', () => {
873
873
  await model.sendFxPutNotificationToBackend(notif.data, conversionId);
874
874
  expect(BackendRequests.__putFxTransfersNotification).toHaveBeenCalledTimes(1);
875
875
  const call = BackendRequests.__putFxTransfersNotification.mock.calls[0];
876
- expect(call[0].conversionState).toEqual(fxNotificationToBackend.data.conversionState);
877
- expect(typeof call[0].completedTimestamp).toBe('string');
876
+ expect(call[0]).toEqual(fxNotificationToBackend.data);
878
877
  expect(call[1]).toEqual(conversionId);
879
878
  });
880
879
 
@@ -892,7 +891,7 @@ describe('inboundModel', () => {
892
891
  await model.sendFxPutNotificationToBackend(notif.data, conversionId);
893
892
  expect(BackendRequests.__putFxTransfersNotification).toHaveBeenCalledTimes(1);
894
893
  const call = BackendRequests.__putFxTransfersNotification.mock.calls[0];
895
- expect(call[0].conversionState).toEqual(fxNotificationAbortedToBackend.data.conversionState);
894
+ expect(call[0]).toEqual(fxNotificationAbortedToBackend.data);
896
895
  expect(call[1]).toEqual(conversionId);
897
896
  });
898
897
 
@@ -910,7 +909,7 @@ describe('inboundModel', () => {
910
909
  await model.sendFxPutNotificationToBackend(notif.data, conversionId);
911
910
  expect(BackendRequests.__putFxTransfersNotification).toHaveBeenCalledTimes(1);
912
911
  const call = BackendRequests.__putFxTransfersNotification.mock.calls[0];
913
- expect(call[0].conversionState).toEqual(fxNotificationReservedToBackend.data.conversionState);
912
+ expect(call[0]).toEqual(fxNotificationReservedToBackend.data);
914
913
  expect(call[1]).toEqual(conversionId);
915
914
  });
916
915
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mojaloop/sdk-scheme-adapter",
3
- "version": "24.10.9-snapshot.2",
3
+ "version": "24.11.0-csi-1680.0",
4
4
  "description": "mojaloop sdk-scheme-adapter",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://github.com/mojaloop/sdk-scheme-adapter",