@@ -140,9 +140,9 @@ export const PoolDetails: () => JSX.Element = () => {
140
140
141
141
// Pool balances
142
142
useEffect ( ( ) => {
143
- if ( pool && isMounted ) {
143
+ if ( isMounted && poolID ) {
144
144
fetchCatcher (
145
- `${ FF_Paths . nsPrefix } /${ selectedNamespace } ${ FF_Paths . tokenBalances } ?pool=${ pool ?. id } `
145
+ `${ FF_Paths . nsPrefix } /${ selectedNamespace } ${ FF_Paths . tokenBalances } ?pool=${ poolID } `
146
146
)
147
147
. then ( async ( balances : ITokenBalance [ ] ) => {
148
148
if ( balances . length === 0 ) {
@@ -167,20 +167,21 @@ export const PoolDetails: () => JSX.Element = () => {
167
167
reportFetchError ( err ) ;
168
168
} ) ;
169
169
}
170
- } , [ pool , isMounted ] ) ;
170
+ } , [ isMounted , poolID ] ) ;
171
171
172
172
// Token transfers and accounts
173
173
useEffect ( ( ) => {
174
174
setTokenTransfers ( undefined ) ;
175
175
176
176
isMounted &&
177
177
dateFilter &&
178
+ poolID &&
178
179
fetchCatcher (
179
180
`${ FF_Paths . nsPrefix } /${ selectedNamespace } ${
180
181
FF_Paths . tokenTransfers
181
182
} ?limit=${ rowsPerPage } &count&skip=${ rowsPerPage * currentPage } ${
182
183
dateFilter . filterString
183
- } &pool=${ pool ?. id } `
184
+ } &pool=${ poolID } `
184
185
)
185
186
. then ( async ( tokenTransferRes : IPagedTokenTransferResponse ) => {
186
187
if ( isMounted ) {
@@ -213,7 +214,7 @@ export const PoolDetails: () => JSX.Element = () => {
213
214
dateFilter ,
214
215
currentPage ,
215
216
selectedNamespace ,
216
- pool ,
217
+ poolID ,
217
218
isMounted ,
218
219
] ) ;
219
220
@@ -262,7 +263,8 @@ export const PoolDetails: () => JSX.Element = () => {
262
263
const accountsCard : IFireFlyCard = {
263
264
headerText : t ( 'accountsInPool' ) ,
264
265
clickPath :
265
- pool && FF_NAV_PATHS . tokensBalancesPathByPool ( selectedNamespace , pool . id ) ,
266
+ poolID &&
267
+ FF_NAV_PATHS . tokensBalancesPathByPool ( selectedNamespace , poolID ) ,
266
268
component : (
267
269
< MediumCardTable
268
270
records = { poolAccountsRecords }
@@ -396,7 +398,9 @@ export const PoolDetails: () => JSX.Element = () => {
396
398
container
397
399
>
398
400
< 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
+ ) }
400
404
</ Grid >
401
405
< Grid container item justifyContent = "flex-start" xs = { 10 } >
402
406
< Typography
@@ -480,7 +484,7 @@ export const PoolDetails: () => JSX.Element = () => {
480
484
dashboardSize
481
485
clickPath = { FF_NAV_PATHS . tokensTransfersPath (
482
486
selectedNamespace ,
483
- pool ?. id
487
+ poolID
484
488
) }
485
489
/>
486
490
</ Grid >
0 commit comments