@actalink/commonlib 0.0.19 → 0.0.21

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.
package/dist/index.cjs CHANGED
@@ -1976,13 +1976,6 @@ var ActaDeposit = class {
1976
1976
  if (!this.depositSessionId || this.depositSessionId === "") {
1977
1977
  throw new Error("Deposit session ID is required.");
1978
1978
  }
1979
- if (this.depositSessionId !== "") {
1980
- const session = yield verifySessionAPICall(
1981
- `${depositServiceUrl}verify-session?sessionId=${this.depositSessionId}`,
1982
- this.depositSessionId
1983
- );
1984
- this.depositSessionId = session.sessionId;
1985
- }
1986
1979
  const signerAddress = this.signerAddress;
1987
1980
  const chainId = this.chainId;
1988
1981
  const tokenSymbol = this.token;
@@ -1990,11 +1983,18 @@ var ActaDeposit = class {
1990
1983
  const receiver = this.receiver;
1991
1984
  const feeInclusive = this.feeInclusive;
1992
1985
  const serviceType = this.serviceType;
1986
+ const { envTransactionServiceUrl, envDepositServiceUrl } = returnEnvUrl(chainId);
1987
+ if (this.depositSessionId !== "") {
1988
+ const session = yield verifySessionAPICall(
1989
+ `${envDepositServiceUrl}verify-session?sessionId=${this.depositSessionId}`,
1990
+ this.depositSessionId
1991
+ );
1992
+ this.depositSessionId = session.sessionId;
1993
+ }
1993
1994
  const token2 = getTokenByChainIdAndSymbol(chainId, tokenSymbol);
1994
1995
  if (!token2) {
1995
1996
  throw new Error("Token not supported.");
1996
1997
  }
1997
- const { envTransactionServiceUrl } = returnEnvUrl(chainId);
1998
1998
  const rpcParameters = yield this.account.signSinglePaymentOperation({
1999
1999
  signerAddress,
2000
2000
  chainId,
@@ -2060,13 +2060,6 @@ var ActaDeposit = class {
2060
2060
  if (!this.walletClient) {
2061
2061
  throw new Error("Signer is required for self custody payments.");
2062
2062
  }
2063
- if (this.depositSessionId !== "") {
2064
- const session = yield verifySessionAPICall(
2065
- `${depositServiceUrl}verify-session?sessionId=${this.depositSessionId}`,
2066
- this.depositSessionId
2067
- );
2068
- this.depositSessionId = session.sessionId;
2069
- }
2070
2063
  const signerAddress = this.signerAddress;
2071
2064
  const chainId = this.chainId;
2072
2065
  const tokenSymbol = this.token;
@@ -2078,6 +2071,14 @@ var ActaDeposit = class {
2078
2071
  const startDate = this.startDate;
2079
2072
  const endDate = this.endDate;
2080
2073
  const serviceType = this.serviceType;
2074
+ const { envTransactionServiceUrl, envDepositServiceUrl } = returnEnvUrl(chainId);
2075
+ if (this.depositSessionId !== "") {
2076
+ const session = yield verifySessionAPICall(
2077
+ `${envDepositServiceUrl}verify-session?sessionId=${this.depositSessionId}`,
2078
+ this.depositSessionId
2079
+ );
2080
+ this.depositSessionId = session.sessionId;
2081
+ }
2081
2082
  const token2 = getTokenByChainIdAndSymbol(chainId, tokenSymbol);
2082
2083
  if (!token2) {
2083
2084
  throw new Error("Token not supported.");
@@ -2085,7 +2086,6 @@ var ActaDeposit = class {
2085
2086
  if (!chainId || !count || !intervalUnit || !startDate || !endDate) {
2086
2087
  throw new Error("Invalid parameters.");
2087
2088
  }
2088
- const { envTransactionServiceUrl } = returnEnvUrl(chainId);
2089
2089
  const { approval, amountExclusive } = yield this.account.signRecurringPayments({
2090
2090
  signerAddress,
2091
2091
  chainId,
package/dist/index.js CHANGED
@@ -1903,13 +1903,6 @@ var ActaDeposit = class {
1903
1903
  if (!this.depositSessionId || this.depositSessionId === "") {
1904
1904
  throw new Error("Deposit session ID is required.");
1905
1905
  }
1906
- if (this.depositSessionId !== "") {
1907
- const session = yield verifySessionAPICall(
1908
- `${depositServiceUrl}verify-session?sessionId=${this.depositSessionId}`,
1909
- this.depositSessionId
1910
- );
1911
- this.depositSessionId = session.sessionId;
1912
- }
1913
1906
  const signerAddress = this.signerAddress;
1914
1907
  const chainId = this.chainId;
1915
1908
  const tokenSymbol = this.token;
@@ -1917,11 +1910,18 @@ var ActaDeposit = class {
1917
1910
  const receiver = this.receiver;
1918
1911
  const feeInclusive = this.feeInclusive;
1919
1912
  const serviceType = this.serviceType;
1913
+ const { envTransactionServiceUrl, envDepositServiceUrl } = returnEnvUrl(chainId);
1914
+ if (this.depositSessionId !== "") {
1915
+ const session = yield verifySessionAPICall(
1916
+ `${envDepositServiceUrl}verify-session?sessionId=${this.depositSessionId}`,
1917
+ this.depositSessionId
1918
+ );
1919
+ this.depositSessionId = session.sessionId;
1920
+ }
1920
1921
  const token2 = getTokenByChainIdAndSymbol(chainId, tokenSymbol);
1921
1922
  if (!token2) {
1922
1923
  throw new Error("Token not supported.");
1923
1924
  }
1924
- const { envTransactionServiceUrl } = returnEnvUrl(chainId);
1925
1925
  const rpcParameters = yield this.account.signSinglePaymentOperation({
1926
1926
  signerAddress,
1927
1927
  chainId,
@@ -1987,13 +1987,6 @@ var ActaDeposit = class {
1987
1987
  if (!this.walletClient) {
1988
1988
  throw new Error("Signer is required for self custody payments.");
1989
1989
  }
1990
- if (this.depositSessionId !== "") {
1991
- const session = yield verifySessionAPICall(
1992
- `${depositServiceUrl}verify-session?sessionId=${this.depositSessionId}`,
1993
- this.depositSessionId
1994
- );
1995
- this.depositSessionId = session.sessionId;
1996
- }
1997
1990
  const signerAddress = this.signerAddress;
1998
1991
  const chainId = this.chainId;
1999
1992
  const tokenSymbol = this.token;
@@ -2005,6 +1998,14 @@ var ActaDeposit = class {
2005
1998
  const startDate = this.startDate;
2006
1999
  const endDate = this.endDate;
2007
2000
  const serviceType = this.serviceType;
2001
+ const { envTransactionServiceUrl, envDepositServiceUrl } = returnEnvUrl(chainId);
2002
+ if (this.depositSessionId !== "") {
2003
+ const session = yield verifySessionAPICall(
2004
+ `${envDepositServiceUrl}verify-session?sessionId=${this.depositSessionId}`,
2005
+ this.depositSessionId
2006
+ );
2007
+ this.depositSessionId = session.sessionId;
2008
+ }
2008
2009
  const token2 = getTokenByChainIdAndSymbol(chainId, tokenSymbol);
2009
2010
  if (!token2) {
2010
2011
  throw new Error("Token not supported.");
@@ -2012,7 +2013,6 @@ var ActaDeposit = class {
2012
2013
  if (!chainId || !count || !intervalUnit || !startDate || !endDate) {
2013
2014
  throw new Error("Invalid parameters.");
2014
2015
  }
2015
- const { envTransactionServiceUrl } = returnEnvUrl(chainId);
2016
2016
  const { approval, amountExclusive } = yield this.account.signRecurringPayments({
2017
2017
  signerAddress,
2018
2018
  chainId,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@actalink/commonlib",
3
- "version": "0.0.19",
3
+ "version": "0.0.21",
4
4
  "author": "Actalink",
5
5
  "license": "MIT license",
6
6
  "publishConfig": {