@myx-trade/sdk 0.1.62 → 0.1.63

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.js CHANGED
@@ -1841,7 +1841,7 @@ var RotationProvider = class extends import_providers.BaseProvider {
1841
1841
  // package.json
1842
1842
  var package_default = {
1843
1843
  name: "@myx-trade/sdk",
1844
- version: "0.1.62",
1844
+ version: "0.1.63",
1845
1845
  private: false,
1846
1846
  publishConfig: {
1847
1847
  access: "public"
@@ -20811,23 +20811,17 @@ var Seamless = class {
20811
20811
  padding: import_crypto_js.default.pad.Pkcs7
20812
20812
  });
20813
20813
  const apiKey = encrypted.toString();
20814
- const isAuthorized = await this.onCheckRelayer(account, wallet.address);
20814
+ let isAuthorized = await this.onCheckRelayer(account, wallet.address);
20815
20815
  this.seamlessWallet = wallet;
20816
20816
  this.seamlessWalletAuthorized = isAuthorized;
20817
20817
  this.seamlessWalletApikey = apiKey;
20818
20818
  const forwarderContract = await getForwarderContract(config.chainId);
20819
- const approvalResult = await this.utils.approveAuthorization({
20820
- quoteAddress: "0x7e248ec1721639413a280d9e82e2862cae2e6e28",
20819
+ const erc20Address = getContractAddressByChainId(config.chainId).ERC20;
20820
+ await this.utils.approveAuthorization({
20821
+ quoteAddress: erc20Address,
20821
20822
  amount: import_ethers27.ethers.MaxUint256.toString(),
20822
20823
  spenderAddress: forwarderContract.target
20823
20824
  });
20824
- console.log("approvalResult-->", approvalResult);
20825
- if (!isAuthorized) {
20826
- await this.authorizeSeamlessAccount({
20827
- seamlessAddress: wallet.address,
20828
- approve: true
20829
- });
20830
- }
20831
20825
  return {
20832
20826
  code: 0,
20833
20827
  data: {
package/dist/index.mjs CHANGED
@@ -1752,7 +1752,7 @@ var RotationProvider = class extends BaseProvider {
1752
1752
  // package.json
1753
1753
  var package_default = {
1754
1754
  name: "@myx-trade/sdk",
1755
- version: "0.1.62",
1755
+ version: "0.1.63",
1756
1756
  private: false,
1757
1757
  publishConfig: {
1758
1758
  access: "public"
@@ -20722,23 +20722,17 @@ var Seamless = class {
20722
20722
  padding: CryptoJS.pad.Pkcs7
20723
20723
  });
20724
20724
  const apiKey = encrypted.toString();
20725
- const isAuthorized = await this.onCheckRelayer(account, wallet.address);
20725
+ let isAuthorized = await this.onCheckRelayer(account, wallet.address);
20726
20726
  this.seamlessWallet = wallet;
20727
20727
  this.seamlessWalletAuthorized = isAuthorized;
20728
20728
  this.seamlessWalletApikey = apiKey;
20729
20729
  const forwarderContract = await getForwarderContract(config.chainId);
20730
- const approvalResult = await this.utils.approveAuthorization({
20731
- quoteAddress: "0x7e248ec1721639413a280d9e82e2862cae2e6e28",
20730
+ const erc20Address = getContractAddressByChainId(config.chainId).ERC20;
20731
+ await this.utils.approveAuthorization({
20732
+ quoteAddress: erc20Address,
20732
20733
  amount: ethers9.MaxUint256.toString(),
20733
20734
  spenderAddress: forwarderContract.target
20734
20735
  });
20735
- console.log("approvalResult-->", approvalResult);
20736
- if (!isAuthorized) {
20737
- await this.authorizeSeamlessAccount({
20738
- seamlessAddress: wallet.address,
20739
- approve: true
20740
- });
20741
- }
20742
20736
  return {
20743
20737
  code: 0,
20744
20738
  data: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myx-trade/sdk",
3
- "version": "0.1.62",
3
+ "version": "0.1.63",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"