on master help sign in
fix: correctly include ecliptic owner logic
b2862a8Matt Condon (shrugs)
src/lib/useIsEclipticOwner.js+6−1
@@ -2,10 +2,15 @@ import { useWallet } from 'store/wallet';
2import { usePointCache } from 'store/pointCache';
2import { usePointCache } from 'store/pointCache';
3
3
4import { eqAddr } from 'lib/wallet';
4import { eqAddr } from 'lib/wallet';
5+import useLifecycle from './useLifecycle';
5
6
6export default function useIsEclipticOwner() {
7export default function useIsEclipticOwner() {
7 const { wallet } = useWallet();
8 const { wallet } = useWallet();
8− const { eclipticOwner } = usePointCache();
9+ const { eclipticOwner, syncEclipticOwner } = usePointCache();
10+
11+ useLifecycle(() => {
12+ syncEclipticOwner();
13+ });
9
14
10 return wallet.matchWith({
15 return wallet.matchWith({
11 Nothing: () => false,
16 Nothing: () => false,
src/store/lib/usePointStore.js+3
@@ -4,11 +4,13 @@ import useDetailsStore from './useDetailsStore';
4import useBirthdaysStore from './useBirthdaysStore';
4import useBirthdaysStore from './useBirthdaysStore';
5import useInvitesStore from './useInvitesStore';
5import useInvitesStore from './useInvitesStore';
6import useControlledPointsStore from './useControlledPointsStore';
6import useControlledPointsStore from './useControlledPointsStore';
7+import useEclipticOwnerStore from './useEclipticOwnerStore';
7
8
8export default function usePointStore() {
9export default function usePointStore() {
9 const { syncDetails, ...details } = useDetailsStore();
10 const { syncDetails, ...details } = useDetailsStore();
10 const { syncBirthday, ...birthdays } = useBirthdaysStore();
11 const { syncBirthday, ...birthdays } = useBirthdaysStore();
11 const { syncInvites, ...invites } = useInvitesStore();
12 const { syncInvites, ...invites } = useInvitesStore();
13+ const ecliptic = useEclipticOwnerStore();
12 const {
14 const {
13 syncControlledPoints,
15 syncControlledPoints,
14 ...controlledPoints
16 ...controlledPoints
@@ -33,6 +35,7 @@ export default function usePointStore() {
33 ...birthdays,
35 ...birthdays,
34 ...invites,
36 ...invites,
35 ...controlledPoints,
37 ...controlledPoints,
38+ ...ecliptic,
36 syncInvites,
39 syncInvites,
37 syncControlledPoints,
40 syncControlledPoints,
38 syncOwnedPoint,
41 syncOwnedPoint,