@xchainjs/xchain-aggregator 1.0.18 → 1.0.19

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
@@ -1,4 +1,4 @@
1
- import { CachedValue, isSynthAsset, isTradeAsset, CryptoAmount, baseAmount, eqAsset, assetFromStringEx, assetToString, isTokenAsset } from '@xchainjs/xchain-util';
1
+ import { CachedValue, isSynthAsset, isTradeAsset, CryptoAmount, baseAmount, isSecuredAsset, eqAsset, assetFromStringEx, assetToString, isTokenAsset } from '@xchainjs/xchain-util';
2
2
  import 'crypto';
3
3
  import { AssetCacao, MAYAChain } from '@xchainjs/xchain-mayachain';
4
4
  import { MayachainAMM } from '@xchainjs/xchain-mayachain-amm';
@@ -27847,6 +27847,9 @@ class ChainflipProtocol {
27847
27847
  if (isTradeAsset(asset)) {
27848
27848
  throw Error('Trade asset not supported in Chainflip protocol');
27849
27849
  }
27850
+ if (isSecuredAsset(asset)) {
27851
+ throw Error('Secured asset not supported in Chainflip protocol');
27852
+ }
27850
27853
  const chainAssets = yield this.assetsData.getValue();
27851
27854
  const assetData = chainAssets.find((chainAsset) => {
27852
27855
  return chainAsset.asset === xAssetToCAsset(asset) && asset.chain === cChainToXChain(chainAsset.chain);
@@ -28014,7 +28017,7 @@ class ThorchainProtocol {
28014
28017
  */
28015
28018
  isAssetSupported(asset) {
28016
28019
  return __awaiter(this, void 0, void 0, function* () {
28017
- if (eqAsset(asset, AssetRuneNative) || isTradeAsset(asset) || isSynthAsset(asset))
28020
+ if (eqAsset(asset, AssetRuneNative) || isTradeAsset(asset) || isSynthAsset(asset) || isSecuredAsset(asset))
28018
28021
  return true;
28019
28022
  const pools = yield this.thorchainQuery.thorchainCache.getPools();
28020
28023
  return (Object.values(pools).findIndex((pool) => pool.isAvailable() && assetToString(asset) === pool.assetString) !== -1);