rubic-sdk 5.34.0-alpha.eddy.6 → 5.34.0-alpha.eddy.7

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.
@@ -16,13 +16,14 @@ exports.ERD = {
16
16
  ANY_CHAIN_TOKEN_TO_ANY_CHAIN_TOKEN: 'ANY_CHAIN_TOKEN_TO_ANY_CHAIN_TOKEN',
17
17
  ANY_CHAIN_TOKEN_TO_ZETA_TOKEN: 'ANY_CHAIN_TOKEN_TO_ZETA_TOKEN'
18
18
  };
19
+ // eslint-disable-next-line complexity
19
20
  function eddyRoutingDirection(from, to) {
20
21
  if (from.blockchain === blockchain_name_1.BLOCKCHAIN_NAME.ZETACHAIN) {
21
- const isSupportedToken = eddy_bridge_contract_addresses_1.ZETA_CHAIN_SUPPORTED_TOKENS.some(zrcToken => (0, blockchain_1.compareAddresses)(zrcToken.address, from.address) &&
22
- to.blockchain === zrcToken.relativeChain);
23
- if (from.isNative)
22
+ const isSupportedFromToken = eddy_bridge_contract_addresses_1.ZETA_CHAIN_SUPPORTED_TOKENS.some(zrcToken => (0, blockchain_1.compareAddresses)(zrcToken.address, from.address));
23
+ const isSupportedToToken = !!(0, find_transit_token_address_1.findCompatibleZrc20TokenAddress)(to);
24
+ if (from.isNative && isSupportedToToken)
24
25
  return exports.ERD.ZETA_NATIVE_TO_ANY_CHAIN_ALL;
25
- if (isSupportedToken)
26
+ if (isSupportedFromToken && isSupportedToToken)
26
27
  return exports.ERD.ZETA_TOKEN_TO_ANY_CHAIN_ALL;
27
28
  }
28
29
  if (from.blockchain !== blockchain_name_1.BLOCKCHAIN_NAME.ZETACHAIN &&
@@ -1 +1 @@
1
- {"version":3,"file":"eddy-bridge-routing-directions.js","sourceRoot":"","sources":["../../../../../../../src/features/cross-chain/calculation-manager/providers/eddy-bridge/utils/eddy-bridge-routing-directions.ts"],"names":[],"mappings":";;;AAAA,8CAA4D;AAE5D,4DAA+D;AAC/D,gFAAgG;AAE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,OAAO,WAAG,CAAC,8BAA8B,CAAC;QACnF,IAAI,CAAC,IAAI,CAAC,QAAQ,IAAI,kBAAkB,IAAI,oBAAoB;YAC5D,OAAO,WAAG,CAAC,6BAA6B,CAAC;KAChD;IAED,IACI,IAAI,CAAC,UAAU,KAAK,iCAAe,CAAC,SAAS;QAC7C,EAAE,CAAC,UAAU,KAAK,iCAAe,CAAC,SAAS,EAC7C;QACE,IAAI,IAAI,CAAC,QAAQ,IAAI,CAAC,EAAE,CAAC,QAAQ;YAAE,OAAO,WAAG,CAAC,mCAAmC,CAAC;QAClF,IAAI,CAAC,IAAI,CAAC,QAAQ,IAAI,CAAC,EAAE,CAAC,QAAQ;YAAE,OAAO,WAAG,CAAC,kCAAkC,CAAC;KACrF;IAED,MAAM,IAAI,gCAAuB,EAAE,CAAC;AACxC,CAAC;AAtCD,oDAsCC;AAED;;GAEG;AACH,SAAgB,cAAc,CAC1B,IAAyC,EACzC,OAAsC;IAEtC,OAAO,IAAA,6BAAgB,EAAC,IAAI,CAAC,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;AACzD,CAAC;AALD,wCAKC"}
1
+ {"version":3,"file":"eddy-bridge-routing-directions.js","sourceRoot":"","sources":["../../../../../../../src/features/cross-chain/calculation-manager/providers/eddy-bridge/utils/eddy-bridge-routing-directions.ts"],"names":[],"mappings":";;;AAAA,8CAA4D;AAE5D,4DAA+D;AAC/D,gFAAgG;AAEhG,gGAA0F;AAC1F,6EAA+E;AAE/E,yBAAyB;AACZ,QAAA,GAAG,GAAG;IACf,+BAA+B,EAAE,iCAAiC;IAClE,8BAA8B,EAAE,gCAAgC;IAChE,4BAA4B,EAAE,8BAA8B;IAC5D,2BAA2B,EAAE,6BAA6B;IAC1D,mCAAmC,EAAE,qCAAqC;IAC1E,kCAAkC,EAAE,oCAAoC;IACxE,6BAA6B,EAAE,+BAA+B;CACxD,CAAC;AAIX,sCAAsC;AACtC,SAAgB,oBAAoB,CAChC,IAAyC,EACzC,EA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AI,CAAC,QAAQ,IAAI,CAAC,EAAE,CAAC,QAAQ;YAAE,OAAO,WAAG,CAAC,mCAAmC,CAAC;QAClF,IAAI,CAAC,IAAI,CAAC,QAAQ,IAAI,CAAC,EAAE,CAAC,QAAQ;YAAE,OAAO,WAAG,CAAC,kCAAkC,CAAC;KACrF;IAED,MAAM,IAAI,gCAAuB,EAAE,CAAC;AACxC,CAAC;AAtCD,oDAsCC;AAED;;GAEG;AACH,SAAgB,cAAc,CAC1B,IAAyC,EACzC,OAAsC;IAEtC,OAAO,IAAA,6BAAgB,EAAC,IAAI,CAAC,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;AACzD,CAAC;AALD,wCAKC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rubic-sdk",
3
- "version": "5.34.0-alpha.eddy.6",
3
+ "version": "5.34.0-alpha.eddy.7",
4
4
  "description": "Simplify dApp creation",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",