@@ -140,9 +140,9 @@ export const PoolDetails: () => JSX.Element = () => {
140140
141141 // Pool balances
142142 useEffect ( ( ) => {
143- if ( pool && isMounted ) {
143+ if ( isMounted && poolID ) {
144144 fetchCatcher (
145- `${ FF_Paths . nsPrefix } /${ selectedNamespace } ${ FF_Paths . tokenBalances } ?pool=${ pool ?. id } `
145+ `${ FF_Paths . nsPrefix } /${ selectedNamespace } ${ FF_Paths . tokenBalances } ?pool=${ poolID } `
146146 )
147147 . then ( async ( balances : ITokenBalance [ ] ) => {
148148 if ( balances . length === 0 ) {
@@ -167,20 +167,21 @@ export const PoolDetails: () => JSX.Element = () => {
167167 reportFetchError ( err ) ;
168168 } ) ;
169169 }
170- } , [ pool , isMounted ] ) ;
170+ } , [ isMounted , poolID ] ) ;
171171
172172 // Token transfers and accounts
173173 useEffect ( ( ) => {
174174 setTokenTransfers ( undefined ) ;
175175
176176 isMounted &&
177177 dateFilter &&
178+ poolID &&
178179 fetchCatcher (
179180 `${ FF_Paths . nsPrefix } /${ selectedNamespace } ${
180181 FF_Paths . tokenTransfers
181182 } ?limit=${ rowsPerPage } &count&skip=${ rowsPerPage * currentPage } ${
182183 dateFilter . filterString
183- } &pool=${ pool ?. id } `
184+ } &pool=${ poolID } `
184185 )
185186 . then ( async ( tokenTransferRes : IPagedTokenTransferResponse ) => {
186187 if ( isMounted ) {
@@ -213,7 +214,7 @@ export const PoolDetails: () => JSX.Element = () => {
213214 dateFilter ,
214215 currentPage ,
215216 selectedNamespace ,
216- pool ,
217+ poolID ,
217218 isMounted ,
218219 ] ) ;
219220
@@ -262,7 +263,8 @@ export const PoolDetails: () => JSX.Element = () => {
262263 const accountsCard : IFireFlyCard = {
263264 headerText : t ( 'accountsInPool' ) ,
264265 clickPath :
265- pool && FF_NAV_PATHS . tokensBalancesPathByPool ( selectedNamespace , pool . id ) ,
266+ poolID &&
267+ FF_NAV_PATHS . tokensBalancesPathByPool ( selectedNamespace , poolID ) ,
266268 component : (
267269 < MediumCardTable
268270 records = { poolAccountsRecords }
@@ -396,7 +398,9 @@ export const PoolDetails: () => JSX.Element = () => {
396398 container
397399 >
398400 < Grid container item justifyContent = "flex-start" xs = { 2 } >
399- < Jazzicon diameter = { 34 } seed = { jsNumberForAddress ( pool . id ) } />
401+ { poolID && (
402+ < Jazzicon diameter = { 34 } seed = { jsNumberForAddress ( poolID ) } />
403+ ) }
400404 </ Grid >
401405 < Grid container item justifyContent = "flex-start" xs = { 10 } >
402406 < Typography
@@ -480,7 +484,7 @@ export const PoolDetails: () => JSX.Element = () => {
480484 dashboardSize
481485 clickPath = { FF_NAV_PATHS . tokensTransfersPath (
482486 selectedNamespace ,
483- pool ?. id
487+ poolID
484488 ) }
485489 />
486490 </ Grid >
0 commit comments