@@ -106,7 +106,7 @@ function ActionButtons({ actions = [] }) {
106106
107107export default function Points() {
108108 const { wallet } = useWallet();
109− const { pop, push, popAndPush, names } = useHistory();
109+ const { pop, push, names } = useHistory();
110110 const { setPointCursor } = usePointCursor();
111111 const { controlledPoints, getDetails } = usePointCache();
112112 const { contracts } = useNetwork();
@@ -119,11 +119,7 @@ export default function Points() {
119119 const { syncStarReleaseDetails, starReleaseDetails } = useStarReleaseCache();
120120
121121 const outgoingPoints = useMemo(
122− () =>
123− pointList.filter(
124− ({ isTransferProxySet, isTransferProxy }) =>
125− isTransferProxySet && !isTransferProxy
126− ),
122+ () => pointList.filter(({ isOutgoing }) => isOutgoing),
127123 [pointList]
128124 );
129125
@@ -164,47 +160,38 @@ export default function Points() {
164160 ),
165161 [getDetails, controlledPoints, _contracts]
166162 );
167− // if we can only interact with a single point, forget about the existence
168− // of this page and jump to the point page.
163+
164+ const allPoints = pointList
165+ .filter(
166+ ({ isTransferProxySet, shouldDisplay }) =>
167+ !isTransferProxySet && shouldDisplay
168+ )
169+ .map(({ value }) => value);
170+
171+ // if we can only interact with a single point, jump to the point page.
169172 // if there are any pending transfers, incoming or outgoing, stay on this
170173 // page, because those can only be completed/cancelled here.
171174 useEffect(() => {
172175 if (Nothing.hasInstance(starReleaseDetails)) {
173176 return;
174177 }
175− controlledPoints.matchWith({
176− Nothing: () => null,
177− Just: r => {
178− r.value.matchWith({
179− Error: () => null,
180− Ok: c => {
181− let all = [
182− ...c.value.ownedPoints,
183− ...c.value.votingPoints,
184− ...c.value.managingPoints,
185− ...c.value.spawningPoints,
186− ];
187− if (
188− all.length === 1 &&
189− incomingPoints.length === 0 &&
190− outgoingPoints.length === 0 &&
191− (starReleaseDetails.value === null ||
192− starReleaseDetails.value.total === 0)
193− ) {
194− setPointCursor(Just(all[0]));
195− popAndPush(names.POINT);
196− }
197− },
198− });
199− },
200− });
178+ if (
179+ allPoints.length === 1 &&
180+ incomingPoints.length === 0 &&
181+ outgoingPoints.length === 0 &&
182+ (starReleaseDetails.value === null ||
183+ starReleaseDetails.value.total === 0)
184+ ) {
185+ setPointCursor(Just(allPoints[0]));
186+ push(names.POINT);
187+ }
201188 }, [
202− controlledPoints,
189+ allPoints,
203190 rejectedPoints,
204191 outgoingPoints,
205192 incomingPoints,
206193 setPointCursor,
207− popAndPush,
194+ push,
208195 names,
209196 starReleaseDetails,
210197 ]);
@@ -216,13 +203,6 @@ export default function Points() {
216203 const ownedPoints = maybeGetResult(controlledPoints, 'ownedPoints', []);
217204 const lockedPoints = maybeLockedPoints.getOrElse([]);
218205
219− const allPoints = pointList
220− .filter(
221− ({ isTransferProxySet, shouldDisplay }) =>
222− !isTransferProxySet && shouldDisplay
223− )
224− .map(({ value }) => value);
225−
226206 const processingPoints = pointList
227207 .filter(({ shouldDisplay }) => !shouldDisplay)
228208 .map(({ value }) => value);
@@ -298,11 +278,7 @@ export default function Points() {
298278 outgoingPoints.length === 0 &&
299279 !starReleasing)
300280 ) {
301− return (
302− <View inset>
303− <LoadingOverlay loading />
304− </View>
305− );
281+ return <LoadingOverlay loading />;
306282 }
307283
308284 return (