diff --git a/packages/api/api-did/server.ts b/packages/api/api-did/server.ts index 8331fc5c2e..50a398a05c 100644 --- a/packages/api/api-did/server.ts +++ b/packages/api/api-did/server.ts @@ -74,7 +74,6 @@ export class DidService extends ServiceInit { send = async (base: BaseConfig, config?: RequestConfig, reCount = 0): Promise => { try { const result = await this.sendOrigin(base, config, reCount); - console.log('this.transformCallbackList.length', this.transformCallbackList.length); if (this.transformCallbackList.length > 0) { const i = this.transformCallbackList.reduce((prevResult, callback) => { return callback(prevResult); diff --git a/packages/api/api-eoa/server.ts b/packages/api/api-eoa/server.ts index a09d06d305..055345cc7f 100644 --- a/packages/api/api-eoa/server.ts +++ b/packages/api/api-eoa/server.ts @@ -53,6 +53,7 @@ export class DidService extends ServiceInit { ...fetchConfig, method, }); + console.log('sendOrigin====', JSON.stringify(fetchResult), URL); return fetchResult; }; setLockCallBack = (callBack: (expired?: boolean) => void) => { diff --git a/packages/hooks/hooks-eoa/activity/index.tsx b/packages/hooks/hooks-eoa/activity/index.ts similarity index 100% rename from packages/hooks/hooks-eoa/activity/index.tsx rename to packages/hooks/hooks-eoa/activity/index.ts diff --git a/packages/hooks/hooks-eoa/assets/index.tsx b/packages/hooks/hooks-eoa/assets/index.ts similarity index 67% rename from packages/hooks/hooks-eoa/assets/index.tsx rename to packages/hooks/hooks-eoa/assets/index.ts index aa4e51c71c..a17b643206 100644 --- a/packages/hooks/hooks-eoa/assets/index.tsx +++ b/packages/hooks/hooks-eoa/assets/index.ts @@ -5,14 +5,22 @@ import { ChainId } from '@portkey-wallet/types'; import { useAppEOASelector } from '../index'; import { useCurrentNetworkInfo, useIsMainnet } from '../network'; import { + showLocalShowTokenInfo, fetchNFTAsync, fetchNFTCollectionsAsync, fetchTokenListAsync, INIT_ACCOUNT_NFT_INFO, INIT_ACCOUNT_TOKEN_INFO, + hideLocalShowTokenInfo, } from '@portkey-wallet/store/store-eoa/assets/slice'; import { useAppCommonDispatch } from '../..'; import { useCurrentAddressInfos, useUniqueIdentify } from '../wallet'; +import { + ITokenSectionResponse, + IUserTokenItem, + IUserTokenItemResponse, + TokenItemShowType, +} from '@portkey-wallet/types/types-eoa/token'; export const useAssets = () => useAppEOASelector(state => state.assets); @@ -97,6 +105,45 @@ export const useAccountTokenInfo = () => { () => assetsState?.accountToken?.accountTokenInfoV2?.[identify] || INIT_ACCOUNT_TOKEN_INFO, [assetsState?.accountToken?.accountTokenInfoV2, identify], ); + const updatedAccountTokenList = useMemo(() => { + const originAccountTokenList = accountTokenInfo.accountTokenList; + const localShowTokenInfo = assetsState.accountToken.localShowTokenInfo?.[identify]; + const mergedTokens = localShowTokenInfo + ?.filter(item => item.isAdded) + ?.reduce((acc: ITokenSectionResponse[], token: IUserTokenItem) => { + const existingToken = acc.find(item => item.symbol === token.symbol); + if (existingToken) { + existingToken?.tokens?.push(token); + } else { + acc.push({ + symbol: token.symbol, + price: Number(token.price) || 0, + balance: token.balance || '0', + decimals: Number(token.decimals) || 0, + balanceInUsd: token.balanceInUsd || '0', + // tokenContractAddress: '', + imageUrl: token.imageUrl, + label: token.label || '', + tokens: [token], + }); + } + return acc; + }, []); + let updatedOriginAccountTokenList: ITokenSectionResponse[] = []; + if (originAccountTokenList) { + updatedOriginAccountTokenList = [...originAccountTokenList]; + mergedTokens?.forEach(mergedToken => { + const existsInOrigin = updatedOriginAccountTokenList?.some( + originToken => originToken.symbol === mergedToken.symbol, + ); + if (!existsInOrigin) { + updatedOriginAccountTokenList?.push(mergedToken); + } + }); + } + + return updatedOriginAccountTokenList.length > 0 ? updatedOriginAccountTokenList : mergedTokens; + }, [accountTokenInfo.accountTokenList, assetsState.accountToken.localShowTokenInfo, identify]); const fetchAccountTokenInfoList = useCallback( (params: { addressInfos: { chainId: ChainId; address: string }[]; @@ -114,7 +161,12 @@ export const useAccountTokenInfo = () => { [identify, dispatch], ); - return { ...accountTokenInfo, fetchAccountTokenInfoList, isFetching: assetsState?.accountToken?.isFetching }; + return { + ...accountTokenInfo, + accountTokenList: updatedAccountTokenList, + fetchAccountTokenInfoList, + isFetching: assetsState?.accountToken?.isFetching, + }; }; export const useAccountBalanceUSD = () => { const identify = useUniqueIdentify(); @@ -197,3 +249,50 @@ export function useFetchTokenAllowanceList() { // [addressInfos], // ); } + +export function useManagerTokenInfo() { + const dispatch = useAppCommonDispatch(); + const identify = useUniqueIdentify(); + const { accountToken } = useAssets(); + console.log('accountToken===1233', accountToken); + const showToken = useCallback( + (token: IUserTokenItem) => { + dispatch( + showLocalShowTokenInfo({ + identify, + token, + }), + ); + }, + [dispatch, identify], + ); + + const hideToken = useCallback( + (token: IUserTokenItem) => { + dispatch( + hideLocalShowTokenInfo({ + identify, + token, + }), + ); + }, + [dispatch, identify], + ); + const switchToken = useCallback( + (item: TokenItemShowType, isDisplay: boolean) => { + console.log('item is::', item, 'isDisplay', isDisplay); + if (isDisplay) { + showToken(item as IUserTokenItem); + } else { + hideToken(item as IUserTokenItem); + } + }, + [hideToken, showToken], + ); + return { + showToken, + hideToken, + switchToken, + localToken: accountToken?.localShowTokenInfo?.[identify], + }; +} diff --git a/packages/hooks/hooks-eoa/useToken.ts b/packages/hooks/hooks-eoa/useToken.ts index 2f2902ff65..995969ad12 100644 --- a/packages/hooks/hooks-eoa/useToken.ts +++ b/packages/hooks/hooks-eoa/useToken.ts @@ -6,7 +6,7 @@ import { } from '@portkey-wallet/store/store-eoa/tokenManagement/action'; import { useMemo, useCallback, useEffect } from 'react'; import { INITIAL_TOKEN_INFO } from '@portkey-wallet/store/store-eoa/tokenManagement/slice'; -import { useAccountTokenInfo } from './assets'; +import { useAccountTokenInfo, useAssets, useManagerTokenInfo } from './assets'; import { useUniqueIdentify } from './wallet'; export const useToken = () => { @@ -36,14 +36,51 @@ export const useToken = () => { export const useTokenLegacy = () => { const dispatch = useAppCommonDispatch(); const identify = useUniqueIdentify(); - + console.log('identify is:: =====', identify); + const { accountTokenList } = useAccountTokenInfo(); + const { localToken } = useManagerTokenInfo(); const tokenState = useAppEOASelector(state => state.tokenManagement); const tokenInfo = useMemo( () => tokenState?.tokenInfo?.[identify] || INITIAL_TOKEN_INFO, [identify, tokenState?.tokenInfo], ); + const updatedTokenDataShowInMarket = useMemo(() => { + console.log('tokenInfo.tokenDataShowInMarket', JSON.stringify(tokenInfo.tokenDataShowInMarket)); + const flattenedAccountTokens = accountTokenList?.flatMap(item => item.tokens); + console.log('flattenedAccountTokens====', JSON.stringify(flattenedAccountTokens)); + console.log('localToken====', JSON.stringify(localToken)); + // const flattenedLocalTokens = localToken?.flatMap(item => item.tokens); + const updatedMarketTokens = tokenInfo.tokenDataShowInMarket.map(token => ({ + ...token, + isAdded: + flattenedAccountTokens?.some(item1 => item1?.symbol === token.symbol && item1.chainId === token.chainId) || + localToken?.some(item1 => item1?.symbol === token.symbol && item1.chainId === token.chainId && item1.isAdded), + })); + + flattenedAccountTokens?.forEach(token => { + if ( + token && + !updatedMarketTokens.some( + marketToken => marketToken.symbol === token.symbol && marketToken.chainId === token.chainId, + ) + ) { + updatedMarketTokens.push({ ...token, isAdded: true }); + } + }); + localToken?.forEach(token => { + if ( + !updatedMarketTokens.some( + marketToken => marketToken.symbol === token.symbol && marketToken.chainId === token.chainId, + ) + ) { + updatedMarketTokens.push({ ...token, isAdded: token.isAdded }); + } + }); + + return updatedMarketTokens; + }, [accountTokenList, localToken, tokenInfo.tokenDataShowInMarket]); const fetchTokenInfoList = useCallback( (params: { keyword: string; chainIdArray: string[]; skipCount?: number; maxResultCount?: number }) => { return dispatch( @@ -55,8 +92,13 @@ export const useTokenLegacy = () => { }, [identify, dispatch], ); - - return { ...tokenInfo, fetchTokenInfoList, isFetching: tokenState.isFetching }; + tokenInfo.tokenDataShowInMarket; + return { + ...tokenInfo, + tokenDataShowInMarket: updatedTokenDataShowInMarket, + fetchTokenInfoList, + isFetching: tokenState.isFetching, + }; }; export const useFetchSymbolImages = () => { const dispatch = useAppCommonDispatch(); diff --git a/packages/mobile-aelf/js/pages/DashBoard/NFTSection/index.tsx b/packages/mobile-aelf/js/pages/DashBoard/NFTSection/index.tsx index 52aa85ff28..c67632279f 100644 --- a/packages/mobile-aelf/js/pages/DashBoard/NFTSection/index.tsx +++ b/packages/mobile-aelf/js/pages/DashBoard/NFTSection/index.tsx @@ -126,7 +126,6 @@ export default function NFTSection() { if (totalRecordCount && accountNFTList.length >= totalRecordCount && !isInit) { return; } - console.log('wfs====fetchAccountNFTCollectionInfoList2'); await fetchAccountNFTCollectionInfoList({ addressInfos, skipCount: isInit ? 0 : accountNFTList.length, @@ -179,7 +178,6 @@ export default function NFTSection() { // setItemId(res.itemId); // setImageUrl(res.imageUrl); setOpenCollectionObj({}); - console.log('wfs====fetchAccountNFTCollectionInfoList5'); getNFTCollectionsAsync(true); }, REFRESH_TIME); return () => { diff --git a/packages/mobile-aelf/js/pages/NFT/CollectionDetail/index.tsx b/packages/mobile-aelf/js/pages/NFT/CollectionDetail/index.tsx index df0c6febbb..65bfcba802 100644 --- a/packages/mobile-aelf/js/pages/NFT/CollectionDetail/index.tsx +++ b/packages/mobile-aelf/js/pages/NFT/CollectionDetail/index.tsx @@ -51,7 +51,7 @@ const CollectionDetail = () => { } return currentCollection; }, [accountNFTList, chainId, symbol]); - console.log('currentCollectionObj', currentCollectionObj); + console.log('currentCollectionObj', JSON.stringify(currentCollectionObj)); const [realItemCount, setRealItemCount] = useState(itemCount); useEffect(() => { if (currentCollectionObj?.totalRecordCount && currentCollectionObj?.totalRecordCount !== itemCount) { diff --git a/packages/mobile-aelf/js/pages/Token/ManageTokenList/index.tsx b/packages/mobile-aelf/js/pages/Token/ManageTokenList/index.tsx index 089f254bde..65b90c75eb 100644 --- a/packages/mobile-aelf/js/pages/Token/ManageTokenList/index.tsx +++ b/packages/mobile-aelf/js/pages/Token/ManageTokenList/index.tsx @@ -1,5 +1,5 @@ import PageContainer from 'components/PageContainer'; -import { TokenItemShowType } from '@portkey-wallet/types/types-ca/token'; +import { TokenItemShowType } from '@portkey-wallet/types/types-eoa/token'; import CommonInput from 'components/CommonInput'; import { View } from 'react-native'; import gStyles from 'assets/theme/GStyles'; @@ -8,8 +8,8 @@ import CommonToast from 'components/CommonToast'; import { useLanguage } from 'i18n/hooks'; import useDebounce from 'hooks/useDebounce'; import { useEffectOnce } from '@portkey-wallet/hooks'; -import { request } from '@portkey-wallet/api/api-did'; -import { useCaAddressInfoList, useChainIdList } from '@portkey-wallet/hooks/hooks-ca/wallet'; +import { request } from '@portkey-wallet/api/api-eoa'; +import { useChainIdList } from '@portkey-wallet/hooks/hooks-eoa/wallet'; import Loading from 'components/Loading'; import FilterTokenSection from '../components/FilterToken'; import PopularTokenSection from '../components/PopularToken'; @@ -17,14 +17,10 @@ import { pTd } from 'utils/unit'; import navigationService from 'utils/navigationService'; import Svg from 'components/Svg'; import Touchable from 'components/Touchable'; -import { - PAGE_SIZE_DEFAULT, - PAGE_SIZE_IN_ACCOUNT_ASSETS, - PAGE_SIZE_IN_ACCOUNT_TOKEN, -} from '@portkey-wallet/constants/constants-ca/assets'; -import { useTokenLegacy } from '@portkey-wallet/hooks/hooks-ca/useToken'; +import { PAGE_SIZE_DEFAULT, PAGE_SIZE_IN_ACCOUNT_ASSETS } from '@portkey-wallet/constants/constants-eoa/assets'; +import { useTokenLegacy } from '@portkey-wallet/hooks/hooks-eoa/useToken'; import useLockCallback from '@portkey-wallet/hooks/useLockCallback'; -import { useAccountTokenInfo } from '@portkey-wallet/hooks/hooks-ca/assets'; +import { useManagerTokenInfo } from '@portkey-wallet/hooks/hooks-eoa/assets'; import { makeStyles } from '@rneui/themed'; interface ManageTokenListProps { @@ -36,10 +32,8 @@ const ManageTokenList: React.FC = () => { const [isSearch, setIsSearching] = useState(false); const { tokenDataShowInMarket, totalRecordCount, fetchTokenInfoList } = useTokenLegacy(); + const { switchToken } = useManagerTokenInfo(); const chainIdArray = useChainIdList(); - const caAddressInfos = useCaAddressInfoList(); - - const { fetchAccountTokenInfoList } = useAccountTokenInfo(); const [keyword, setKeyword] = useState(''); const [filterTokenList, setFilterTokenList] = useState([]); @@ -83,9 +77,11 @@ const ManageTokenList: React.FC = () => { maxResultCount: PAGE_SIZE_DEFAULT, }, }); + console.log('res====', JSON.stringify(res)); const _target = (res || []).map((item: any) => ({ ...item, - isAdded: item.isDisplay, + isAdded: + tokenDataShowInMarket?.find(it => it.symbol === item.symbol && it.chainId === item.chainId)?.isAdded || false, userTokenId: item.id, })); setFilterTokenList(_target); @@ -95,39 +91,22 @@ const ManageTokenList: React.FC = () => { } finally { setIsSearching(false); } - }, [chainIdArray, debounceWord, keyword]); + }, [chainIdArray, debounceWord, keyword, tokenDataShowInMarket]); const onSwitchTokenDisplay = useCallback( async (item: TokenItemShowType, isDisplay: boolean) => { Loading.showOnce(); try { - await request.token.displayUserToken({ - resourceUrl: `${item.userTokenId}/display`, - params: { - isDisplay, - }, - }); - timerRef.current = setTimeout(async () => { - fetchAccountTokenInfoList({ - caAddressInfos, - skipCount: 0, - maxResultCount: PAGE_SIZE_IN_ACCOUNT_TOKEN, - }); - - if (debounceWord) { - await searchToken(); - } else { - await getTokenList(true); - } - Loading.hide(); - }, 800); + switchToken(item, isDisplay); } catch (err) { Loading.hide(); CommonToast.failError(err); + } finally { + Loading.hide(); } }, - [caAddressInfos, debounceWord, fetchAccountTokenInfoList, getTokenList, searchToken], + [switchToken], ); const onHandleToken = useCallback( diff --git a/packages/mobile-aelf/js/pages/Token/components/FilterToken/index.tsx b/packages/mobile-aelf/js/pages/Token/components/FilterToken/index.tsx index 761cc8f6d7..e00e08de1e 100644 --- a/packages/mobile-aelf/js/pages/Token/components/FilterToken/index.tsx +++ b/packages/mobile-aelf/js/pages/Token/components/FilterToken/index.tsx @@ -1,8 +1,8 @@ -import { TokenItemShowType } from '@portkey-wallet/types/types-ca/token'; +import { TokenItemShowType } from '@portkey-wallet/types/types-eoa/token'; import { StyleSheet } from 'react-native'; import gStyles from 'assets/theme/GStyles'; import { darkColors, defaultColors } from 'assets/theme'; -import React, { useCallback } from 'react'; +import React, { useCallback, useState } from 'react'; import { FlatList } from 'react-native'; import { pTd } from 'utils/unit'; import { useLanguage } from 'i18n/hooks'; @@ -26,7 +26,10 @@ interface IFilterTokenSectionProps { const FilterTokenSection: React.FC = (props: IFilterTokenSectionProps) => { const { tokenList, onHandleTokenItem, isSearch } = props; - + const [extraIndex, setExtraIndex] = useState(0); + const reload = useCallback(() => { + setExtraIndex(extraIndex + 1); + }, [extraIndex]); const { t } = useLanguage(); const CustomTokenTips = useCallback( @@ -50,10 +53,19 @@ const FilterTokenSection: React.FC = (props: IFilterTo (isSearch ? <> : CustomTokenTips(TipsEnum.NO_RESULT))} ListFooterComponent={() => (tokenList?.length > 0 ? CustomTokenTips(TipsEnum.TRY) : null)} renderItem={({ item }: { item: TokenItemShowType }) => ( - onHandleTokenItem(item, !item?.isAdded)} /> + { + onHandleTokenItem(item, !item?.isAdded); + item.isAdded = !item?.isAdded; + reload(); + }} + /> )} keyExtractor={(item: TokenItemShowType) => `${item?.symbol}_${item?.chainId}`} /> diff --git a/packages/mobile-aelf/js/pages/Token/components/PopularToken/index.tsx b/packages/mobile-aelf/js/pages/Token/components/PopularToken/index.tsx index 098c89c0f0..082519ff41 100644 --- a/packages/mobile-aelf/js/pages/Token/components/PopularToken/index.tsx +++ b/packages/mobile-aelf/js/pages/Token/components/PopularToken/index.tsx @@ -1,4 +1,4 @@ -import { TokenItemShowType } from '@portkey-wallet/types/types-ca/token'; +import { TokenItemShowType } from '@portkey-wallet/types/types-eoa/token'; import { StyleSheet } from 'react-native'; import React from 'react'; import { FlatList } from 'react-native'; @@ -23,7 +23,7 @@ const PopularTokenSection: React.FC = (props: IPopula onHandleTokenItem(item, !item?.isAdded)} /> )} onEndReached={() => getTokenList()} - keyExtractor={(item: TokenItemShowType) => `${item?.symbol}_${item?.chainId}`} + keyExtractor={(item: TokenItemShowType, index: number) => `${item?.symbol}_${item?.chainId}_${index}`} /> ); }; diff --git a/packages/mobile-aelf/js/pages/Token/components/TokenItem/index.tsx b/packages/mobile-aelf/js/pages/Token/components/TokenItem/index.tsx index 2d38fab675..f31a6b3913 100644 --- a/packages/mobile-aelf/js/pages/Token/components/TokenItem/index.tsx +++ b/packages/mobile-aelf/js/pages/Token/components/TokenItem/index.tsx @@ -1,4 +1,4 @@ -import { TokenItemShowType } from '@portkey-wallet/types/types-ca/token'; +import { TokenItemShowType } from '@portkey-wallet/types/types-eoa/token'; import { View } from 'react-native'; import React from 'react'; import { TextL, TextM } from 'components/CommonText'; @@ -10,7 +10,7 @@ import GStyles from 'assets/theme/GStyles'; import { darkColors } from 'assets/theme'; import { makeStyles } from '@rneui/themed'; import CustomSwitch from 'components/CustomSwitch'; -import { useIsMainnet } from '@portkey-wallet/hooks/hooks-ca/network'; +import { useIsMainnet } from '@portkey-wallet/hooks/hooks-eoa/network'; type TokenItemProps = { item: TokenItemShowType; diff --git a/packages/store/store-eoa/assets/slice.ts b/packages/store/store-eoa/assets/slice.ts index 28559a186d..15e6ca26e4 100644 --- a/packages/store/store-eoa/assets/slice.ts +++ b/packages/store/store-eoa/assets/slice.ts @@ -14,6 +14,7 @@ import { ITokenSectionResponse, TokenItemShowType } from '@portkey-wallet/types/ import { TAssetsState } from './type'; import { ChainId, NetworkType } from '@portkey-wallet/types'; import { NEW_CLIENT_MOCK_ELF_LIST, PAGE_SIZE_IN_NFT_ITEM } from '@portkey-wallet/constants/constants-ca/assets'; +import { ITokenInfoV2, IUserTokenItem, IUserTokenItemResponse } from '@portkey-wallet/types/types-eoa/token'; // import { WalletState } from '../wallet/type'; export const INIT_ACCOUNT_TOKEN_INFO = { @@ -365,6 +366,37 @@ export const assetsSlice = createSlice({ const payload = action.payload; state.nftSectionUiType = payload; }, + showLocalShowTokenInfo: (state, action: PayloadAction<{ identify: string; token: IUserTokenItem }>) => { + const { token, identify } = action.payload; + let preLocalShowTokenInfo = state.accountToken.localShowTokenInfo?.[identify]; + if (!preLocalShowTokenInfo) { + preLocalShowTokenInfo = []; + } + const existToken = preLocalShowTokenInfo.find( + item => item.symbol === token.symbol && item.chainId === token.chainId, + ); + if (existToken) { + existToken.isAdded = true; + } else { + preLocalShowTokenInfo.push({ ...token, isAdded: true }); + } + state.accountToken.localShowTokenInfo = { + ...state.accountToken.localShowTokenInfo, + [identify]: preLocalShowTokenInfo, + }; + }, + hideLocalShowTokenInfo: (state, action: PayloadAction<{ identify: string; token: IUserTokenItem }>) => { + const { token, identify } = action.payload; + const preLocalShowTokenInfo = state.accountToken.localShowTokenInfo?.[identify]; + if (preLocalShowTokenInfo) { + state.accountToken.localShowTokenInfo = { + ...state.accountToken.localShowTokenInfo, + [identify]: preLocalShowTokenInfo.map(item => + item.symbol === token.symbol && item.chainId === token.chainId ? { ...item, isAdded: false } : item, + ), + }; + } + }, }, extraReducers: builder => { builder @@ -620,6 +652,8 @@ export const { clearAccountAssetsInfo, clearAccountTokenInfo, changeNftSectionUiType, + showLocalShowTokenInfo, + hideLocalShowTokenInfo, } = assetsSlice.actions; export default assetsSlice; diff --git a/packages/store/store-eoa/assets/type.ts b/packages/store/store-eoa/assets/type.ts index 1715b525a3..23fb584046 100644 --- a/packages/store/store-eoa/assets/type.ts +++ b/packages/store/store-eoa/assets/type.ts @@ -1,6 +1,11 @@ import { ChainId, NetworkType } from '@portkey-wallet/types'; -import { NFTCollectionItemShowType, SeedTypeEnum } from '@portkey-wallet/types/types-ca/assets'; -import { IAccountCryptoBoxAssetItem, ITokenSectionResponse } from '@portkey-wallet/types/types-ca/token'; +import { NFTCollectionItemShowType, SeedTypeEnum } from '@portkey-wallet/types/types-eoa/assets'; +import { + IAccountCryptoBoxAssetItem, + ITokenSectionResponse, + IUserTokenItem, +} from '@portkey-wallet/types/types-eoa/token'; +import { ITokenInfoV2, IUserTokenItemResponse } from '@portkey-wallet/types/types-eoa/token'; export interface ITokenInfoType { balance: string; @@ -104,6 +109,9 @@ export type TAssetsState = { accountTokenInfoV2?: { [key in string]?: TAccountTokenInfo; }; + localShowTokenInfo?: { + [key in string]?: IUserTokenItem[]; + }; }; accountNFT: TAccountNFTInfo & { isFetching: boolean; diff --git a/packages/store/store-eoa/tokenManagement/action.ts b/packages/store/store-eoa/tokenManagement/action.ts index 33bf582491..9a5fc77c46 100644 --- a/packages/store/store-eoa/tokenManagement/action.ts +++ b/packages/store/store-eoa/tokenManagement/action.ts @@ -31,7 +31,7 @@ export const fetchAllTokenListAsync = createAsyncThunk( skipCount, maxResultCount, }); - + console.log('response=====111', JSON.stringify(response)); return { list: response.items, totalRecordCount: response.totalCount, skipCount, maxResultCount, identify }; }, ); diff --git a/packages/types/types-eoa/token.ts b/packages/types/types-eoa/token.ts index c968cec23c..48bc476262 100644 --- a/packages/types/types-eoa/token.ts +++ b/packages/types/types-eoa/token.ts @@ -37,7 +37,7 @@ export interface TokenItemShowType extends TokenItemType { price?: string | number; userTokenId?: string; } -export type IUserTokenItem = Omit & { isDisplay?: boolean; address?: string }; +export type IUserTokenItem = Omit & { isDisplay?: boolean }; export type ITokenSectionResponse = { chainId?: string;