on master help sign in
Merge pull request #179 from urbit/fix/ecliptic-owner

fix: correctly include ecliptic owner logic

commitc603ef946dcf2fe5a6cddef11d662c33cf497f3c authorMatt Condon <mattgcondon@gmail.com> dateMon 1 Jul 2019, 11:42 (7 years ago) parent01c95c6b2862a8
2 files changed+9−1
src/lib/useIsEclipticOwner.js+6−1 src/store/lib/usePointStore.js+3
src/lib/useIsEclipticOwner.js+6−1
@@ -2,10 +2,15 @@ import { useWallet } from 'store/wallet';
22import { usePointCache } from 'store/pointCache';
33
44import { eqAddr } from 'lib/wallet';
5+import useLifecycle from './useLifecycle';
56
67export default function useIsEclipticOwner() {
78 const { wallet } = useWallet();
8− const { eclipticOwner } = usePointCache();
9+ const { eclipticOwner, syncEclipticOwner } = usePointCache();
10+
11+ useLifecycle(() => {
12+ syncEclipticOwner();
13+ });
914
1015 return wallet.matchWith({
1116 Nothing: () => false,
src/store/lib/usePointStore.js+3
@@ -4,11 +4,13 @@ import useDetailsStore from './useDetailsStore';
44import useBirthdaysStore from './useBirthdaysStore';
55import useInvitesStore from './useInvitesStore';
66import useControlledPointsStore from './useControlledPointsStore';
7+import useEclipticOwnerStore from './useEclipticOwnerStore';
78
89export default function usePointStore() {
910 const { syncDetails, ...details } = useDetailsStore();
1011 const { syncBirthday, ...birthdays } = useBirthdaysStore();
1112 const { syncInvites, ...invites } = useInvitesStore();
13+ const ecliptic = useEclipticOwnerStore();
1214 const {
1315 syncControlledPoints,
1416 ...controlledPoints
@@ -33,6 +35,7 @@ export default function usePointStore() {
3335 ...birthdays,
3436 ...invites,
3537 ...controlledPoints,
38+ ...ecliptic,
3639 syncInvites,
3740 syncControlledPoints,
3841 syncOwnedPoint,