on master help sign in
invites-ui: only show L2 invites

This filters the list of points retrieved from the controlledPointStore. When loading the data, the store concatenates both L1 and L2 invited points into the same array.

commita876e8d6f0984a22c7beb03f78b4bb9a17986306 authortomholford <tomholford@users.noreply.github.com> dateWed 2 Feb 2022, 14:34 (5 years ago) parent2ae620c
1 file changed+9−4
src/lib/useRoller.ts+9−4
src/lib/useRoller.ts+9−4
@@ -31,9 +31,13 @@ import {
3131 getTimeToNextBatch,
3232 registerProxyAddress,
3333 isL2Spawn,
34− isL2,
3534} from './utils/roller';
36−import { ETH_ZERO_ADDR, ROLLER_HOSTS, TEN_SECONDS } from './constants';
35+import {
36+ ETH_ZERO_ADDR,
37+ POINT_DOMINIONS,
38+ ROLLER_HOSTS,
39+ TEN_SECONDS,
40+} from './constants';
3741
3842import {
3943 Config,
@@ -428,9 +432,10 @@ export default function useRoller() {
428432 }
429433
430434 if (
431− invite.owner.toLowerCase() ===
435+ (invite.owner.toLowerCase() ===
432436 planetInfo.ownership?.owner?.address ||
433− planetInfo.ownership?.transferProxy?.address !== ETH_ZERO_ADDR
437+ planetInfo.ownership?.transferProxy?.address !== ETH_ZERO_ADDR) &&
438+ planetInfo.dominion === POINT_DOMINIONS.L2
434439 ) {
435440 newInvites.push(invite);
436441 updateInvite(curPoint, invite);