@xchainjs/xchain-mayachain-amm 3.0.3 → 3.0.4

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/lib/index.esm.js CHANGED
@@ -89912,6 +89912,10 @@ class MayachainAMM {
89912
89912
  isRouterApprovedToSpend({ asset, amount, address }) {
89913
89913
  return __awaiter$8(this, void 0, void 0, function* () {
89914
89914
  const errors = [];
89915
+ if (!isProtocolERC20Asset(asset)) {
89916
+ errors.push('Asset should be ERC20');
89917
+ return errors;
89918
+ }
89915
89919
  // Get inbound details for the asset chain
89916
89920
  const inboundDetails = yield this.mayachainQuery.getChainInboundDetails(asset.chain);
89917
89921
  if (!inboundDetails.router)
package/lib/index.js CHANGED
@@ -89920,6 +89920,10 @@ class MayachainAMM {
89920
89920
  isRouterApprovedToSpend({ asset, amount, address }) {
89921
89921
  return __awaiter$8(this, void 0, void 0, function* () {
89922
89922
  const errors = [];
89923
+ if (!isProtocolERC20Asset(asset)) {
89924
+ errors.push('Asset should be ERC20');
89925
+ return errors;
89926
+ }
89923
89927
  // Get inbound details for the asset chain
89924
89928
  const inboundDetails = yield this.mayachainQuery.getChainInboundDetails(asset.chain);
89925
89929
  if (!inboundDetails.router)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xchainjs/xchain-mayachain-amm",
3
- "version": "3.0.3",
3
+ "version": "3.0.4",
4
4
  "description": "module that exposes estimating & swapping cryptocurrency assets on mayachain",
5
5
  "keywords": [
6
6
  "MAYAChain",
@@ -36,16 +36,16 @@
36
36
  "url": "https://github.com/xchainjs/xchainjs-lib/issues"
37
37
  },
38
38
  "dependencies": {
39
- "@xchainjs/xchain-arbitrum": "1.0.3",
40
- "@xchainjs/xchain-bitcoin": "1.0.1",
41
- "@xchainjs/xchain-client": "1.0.1",
42
- "@xchainjs/xchain-dash": "1.0.1",
43
- "@xchainjs/xchain-ethereum": "1.0.3",
44
- "@xchainjs/xchain-kujira": "1.0.1",
45
- "@xchainjs/xchain-mayachain": "2.0.1",
46
- "@xchainjs/xchain-mayachain-query": "1.0.1",
47
- "@xchainjs/xchain-thorchain": "2.0.1",
48
- "@xchainjs/xchain-wallet": "1.0.3",
39
+ "@xchainjs/xchain-arbitrum": "1.0.4",
40
+ "@xchainjs/xchain-bitcoin": "1.0.2",
41
+ "@xchainjs/xchain-client": "1.0.2",
42
+ "@xchainjs/xchain-dash": "1.0.2",
43
+ "@xchainjs/xchain-ethereum": "1.0.4",
44
+ "@xchainjs/xchain-kujira": "1.0.2",
45
+ "@xchainjs/xchain-mayachain": "2.0.2",
46
+ "@xchainjs/xchain-mayachain-query": "1.0.2",
47
+ "@xchainjs/xchain-thorchain": "2.0.2",
48
+ "@xchainjs/xchain-wallet": "1.0.4",
49
49
  "ethers": "5.7.2"
50
50
  },
51
51
  "devDependencies": {