Skip to content
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

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

kunstmusik
Copy link
Collaborator

No description provided.

…e getGatewayDelegates() and getDelegations()
Copy link

github-actions bot commented Nov 14, 2024

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

value={
gateways
? Object.entries(gateways).filter(
(entry) => entry[1].status === 'joined',
Copy link
Collaborator

@dtfiedler dtfiedler Nov 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
(entry) => entry[1].status === 'joined',
([_address, gateway]) => gateway.status === 'joined',

Copy link
Collaborator Author

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,
Copy link
Collaborator

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?

Copy link
Collaborator Author

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
Copy link
Collaborator

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

@dtfiedler dtfiedler self-requested a review November 14, 2024 22:46
@dtfiedler
Copy link
Collaborator

Related PR: ar-io/ar-io-network-process#182

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants