-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PE-7115: remove use of delegates field on gateways and update app to use getGatewayDelegates() and getDelegations() #111
base: develop
Are you sure you want to change the base?
Conversation
…e getGatewayDelegates() and getDelegations()
Visit the preview URL for this PR (updated for commit 0e3a9b2): https://ar-io-network-portal-a40ee--pr111-pe-7115-update-to-re-w2mceo55.web.app (expires Thu, 28 Nov 2024 22:45:45 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: 7abfae09c4446982a71cbb94b0cbf4688377a111 |
src/components/Header.tsx
Outdated
value={ | ||
gateways | ||
? Object.entries(gateways).filter( | ||
(entry) => entry[1].status === 'joined', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(entry) => entry[1].status === 'joined', | |
([_address, gateway]) => gateway.status === 'joined', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried something like this initially but I get a lint error on unused _address. I went ahead with the change but added a //eslint-disable
|
||
return retVal; | ||
}, | ||
staleTime: Infinity, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any consequence of this stale time?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added this in so that the query should return the same value for the duration of the session unless explicitly invalidated by user action (i.e., instant withdrawal, cancelling a stake, adding new stake).
@@ -76,8 +76,9 @@ const Header = () => { | |||
value={ | |||
gateways | |||
? Object.entries(gateways).filter( | |||
(entry) => entry[1].status === 'joined', | |||
).length | |||
// eslint-disable-next-line @typescript-eslint/no-unused-vars |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i thought maybe the _
would avoid needing this, fine to revert
Related PR: ar-io/ar-io-network-process#182 |
No description provided.