@kaspacom/swap-sdk 1.1.21 → 1.1.23

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
@@ -1366,7 +1366,7 @@ var SwapService = class {
1366
1366
  return num.toFixed(decimals);
1367
1367
  }
1368
1368
  async refreshPairsFromBackend() {
1369
- const response = await fetch(`${this.config.badckendApiUrl}/dex/graph-pairs`, {
1369
+ const response = await fetch(`${this.config.badckendApiUrl}/dex/graph-pairs?network=${this.config.defiApiNetworkName}`, {
1370
1370
  method: "GET"
1371
1371
  });
1372
1372
  if (!response.ok) throw new Error(`Network error: ${response.status}`);
@@ -1661,7 +1661,8 @@ var SwapService = class {
1661
1661
  throw new Error("Please connect wallet first");
1662
1662
  }
1663
1663
  try {
1664
- const deadlineTimestamp = Math.floor(Date.now() / 1e3) + deadline * 60;
1664
+ const block = await this.provider.getBlock("latest");
1665
+ const deadlineTimestamp = (block?.timestamp || Math.floor(Date.now() / 1e3)) + deadline * 60;
1665
1666
  let tx;
1666
1667
  const signerAddress = await this.signer.getAddress();
1667
1668
  const iface = this.proxyContract ? this.proxyContract.interface : this.routerContract.interface;