@riocrypto/common 1.0.2158 → 1.0.2160

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.
@@ -1,5 +1,3 @@
1
- import { Country } from "../types/country";
2
- export declare const getTwoWaySettlementDate: ({ country, daysUntilSettlementDate, }: {
3
- country: Country;
1
+ export declare const getTwoWaySettlementDate: ({ daysUntilSettlementDate, }: {
4
2
  daysUntilSettlementDate: number;
5
3
  }) => Date;
@@ -1,15 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getTwoWaySettlementDate = void 0;
4
- const get_country_timezone_1 = require("./get-country-timezone");
5
- const getTwoWaySettlementDate = ({ country, daysUntilSettlementDate, }) => {
6
- const timezone = (0, get_country_timezone_1.getCountryTimezone)(country);
4
+ const getTwoWaySettlementDate = ({ daysUntilSettlementDate, }) => {
7
5
  // Get today's date in the country's timezone
8
6
  const today = new Date();
9
- const todayInCountryTZ = new Date(today.toLocaleString("en-US", { timeZone: timezone }));
10
- // Add the specified number of days
11
- const settlementDate = new Date(todayInCountryTZ);
12
- settlementDate.setDate(todayInCountryTZ.getDate() + daysUntilSettlementDate);
13
- return settlementDate;
7
+ today.setDate(today.getDate() + daysUntilSettlementDate);
8
+ return today;
14
9
  };
15
10
  exports.getTwoWaySettlementDate = getTwoWaySettlementDate;
@@ -6,7 +6,7 @@ export interface PlatformFeeRange {
6
6
  deferredPaymentFee?: {
7
7
  [deferredPaymentType in DeferredPaymentType]: number;
8
8
  };
9
- twoWaySettlementOffsetFee?: {
9
+ twoWaySettlementDateOffsetFee?: {
10
10
  [key: number]: number;
11
11
  };
12
12
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common",
3
- "version": "1.0.2158",
3
+ "version": "1.0.2160",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",