File tree Expand file tree Collapse file tree 4 files changed +15
-5
lines changed
service/rpc/indexing/nft/cronos Expand file tree Collapse file tree 4 files changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,8 @@ All notable changes to this project will be documented in this file.
77* Released*
88## [ v1.1.1] - 2022-07-15
99### Bug fixes
10- - Clean up duplicated rewards & delegations
10+ - Clean up duplicated rewards, delegations
11+ - Incorrect display of Mainnet Cronos NFT transfer history for Testnet wallet
1112## [ v1.1.0] - 2022-07-11
1213### Additions
1314- View Governance Voting History
Original file line number Diff line number Diff line change 11import { Select } from 'antd' ;
22import React , { useState } from 'react' ;
3+ import { useRecoilValue } from 'recoil' ;
34import { useCronosEvmAsset , useCronosTendermintAsset } from '../../../hooks/useCronosEvmAsset' ;
45import { UserAsset } from '../../../models/UserAsset' ;
6+ import { sessionState } from '../../../recoil/atom' ;
7+ import { checkIfTestnet } from '../../../utils/utils' ;
58
69interface IChainSelectProps {
710 onChangeAsset : ( asset : UserAsset | undefined ) => void ;
@@ -11,7 +14,11 @@ const ChainSelect = (props: IChainSelectProps) => {
1114 const cronosTendermintAsset = useCronosTendermintAsset ( ) ;
1215 const cronosEvmAsset = useCronosEvmAsset ( ) ;
1316 const [ currentAsset , setCurrentAsset ] = useState ( cronosTendermintAsset ) ;
14- const selectableAssets = [ cronosTendermintAsset , cronosEvmAsset ] ;
17+ const currentSession = useRecoilValue ( sessionState ) ;
18+ const selectableAssets = [
19+ cronosTendermintAsset ,
20+ ...( ! checkIfTestnet ( currentSession . wallet . config . network ) ? [ cronosEvmAsset ] : [ ] ) ,
21+ ] ;
1522
1623 return (
1724 < Select
Original file line number Diff line number Diff line change @@ -112,7 +112,9 @@ const CronosNFTTransactionList = () => {
112112 } }
113113 columns = { NftTransactionColumns }
114114 dataSource = { nftTransfers }
115- rowKey = { record => record . tx_hash }
115+ rowKey = { record =>
116+ `${ record . tx_hash } _${ record . event_type } _${ record . token_address } _${ record . token_name } `
117+ }
116118 />
117119 ) ;
118120} ;
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ export class CronosNftIndexingAPI {
7171 return [ ] ;
7272 }
7373
74- nftTxsList . push ( ...response . data . nft_txs ) ;
74+ nftTxsList . push ( ...response . data . nft_txs . filter ( tx => tx . event_type === 'Transfer' ) ) ;
7575
7676 let txsResponse : NftTxsResponse = response ;
7777
@@ -85,7 +85,7 @@ export class CronosNftIndexingAPI {
8585 txsResponse = pageNftsListRequest . data ;
8686 paginationPage ++ ;
8787 if ( txsResponse . code === 0 ) {
88- nftTxsList . push ( ...txsResponse . data . nft_txs ) ;
88+ nftTxsList . push ( ...txsResponse . data . nft_txs . filter ( tx => tx . event_type === 'Transfer' ) ) ;
8989 }
9090 }
9191
You can’t perform that action at this time.
0 commit comments