Skip to content

Commit

Permalink
fix chain-registry types
Browse files Browse the repository at this point in the history
  • Loading branch information
Zetazzz committed Jan 27, 2025
1 parent 588b36d commit 46e2a85
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions examples/injective-vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"@tanstack/vue-query": "5.62.7",
"interchain-vue": "1.6.2",
"osmojs": "^16.15.0",
"bignumber.js": "9.1.0",
"vue": "^3.5.13",
"vue-router": "^4.5.0"
},
Expand Down
10 changes: 5 additions & 5 deletions examples/injective-vue/src/composables/common/useAssets.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import { Asset, AssetList } from '@chain-registry/types';
import { asset_lists as ibcAssetLists } from '@chain-registry/assets';
import { assets as chainAssets } from 'chain-registry';
import { Asset, AssetList } from '@chain-registry/v2-types';
import { assetLists as ibcAssetLists } from '@chain-registry/v2';
import { assetLists as chainAssets } from '@chain-registry/v2';
import { Ref } from 'vue'


export const useAssets = (chainName: Ref<string>) => {
const filterAssets = (assetList: AssetList[]): Asset[] => {
return (
assetList
.find(({ chain_name }) => chain_name === chainName.value)
?.assets?.filter(({ type_asset }) => type_asset !== 'ics20') || []
.find(({ chainName: name }) => name === chainName.value)
?.assets?.filter(({ typeAsset: ta }) => ta !== 'ics20') || []
);
};

Expand Down

0 comments on commit 46e2a85

Please sign in to comment.