Skip to content

Commit

Permalink
fix: allow for no stakes on registration
Browse files Browse the repository at this point in the history
  • Loading branch information
Aerilym committed Oct 10, 2024
1 parent 219f489 commit d9364a8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/staking/app/register/NodeRegistrations.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,11 @@ export default function NodeRegistrations() {
return [];
}

if (!stakesData || stakesData.stakes.length === 0) {
if (!stakesData || !stakesData?.stakes?.length) {
return registrationsData?.registrations ?? [];
}

const stakedNodeEd25519Pubkeys = stakesData.stakes.map(
const stakedNodeEd25519Pubkeys = stakesData?.stakes?.map(
({ service_node_pubkey }) => service_node_pubkey
);

Expand Down

0 comments on commit d9364a8

Please sign in to comment.