on master help sign in
Merge pull request #967 from urbit/t/add-migrate-warning
162912btomholford
src/views/Points.scss+11
@@ -15,3 +15,14 @@
15 font-family: 'Inter';
15 font-family: 'Inter';
16 }
16 }
17}
17}
18+
19+div.migrated-info-box {
20+ margin-top: 30px;
21+ font-size: 14px;
22+ display: flex;
23+ flex-flow: row nowrap;
24+
25+ span.message {
26+ padding-left: 5px;
27+ }
28+}
src/views/Points.tsx+17−13
@@ -28,11 +28,12 @@ import L2PointHeader from 'components/L2/Headers/L2PointHeader';
28import IncomingPoint from 'components/L2/Points/IncomingPoint';
28import IncomingPoint from 'components/L2/Points/IncomingPoint';
29import LoadingOverlay from 'components/L2/LoadingOverlay';
29import LoadingOverlay from 'components/L2/LoadingOverlay';
30import PointList from 'components/L2/PointList';
30import PointList from 'components/L2/PointList';
31−import { Box, Text } from '@tlon/indigo-react';
31+import { Box, Icon, Text } from '@tlon/indigo-react';
32
32
33import './Points.scss';
33import './Points.scss';
34import { StarReleaseButton } from './Points/StarReleaseButton';
34import { StarReleaseButton } from './Points/StarReleaseButton';
35import { maybeGetResult } from 'lib/maybeGetResult';
35import { maybeGetResult } from 'lib/maybeGetResult';
36+import { isGalaxy, isStar } from 'lib/utils/point';
36
37
37export const isLocked = (details: any, contracts: any) =>
38export const isLocked = (details: any, contracts: any) =>
38 details.owner === contracts.linearSR ||
39 details.owner === contracts.linearSR ||
@@ -172,6 +173,11 @@ export default function Points() {
172 const displayEmptyState =
173 const displayEmptyState =
173 !loading && incomingPoints.length === 0 && allPoints.length === 0;
174 !loading && incomingPoints.length === 0 && allPoints.length === 0;
174
175
176+ // If the user has any stars or galaxies, give a polite heads up that
177+ // it can take some time for the roller be aware of L1 TXs
178+ const showMigrateNotice = !displayEmptyState &&
179+ allPoints.some(p => isStar(p.value) || isGalaxy(p.value));
180+
175 const starReleasing = starReleaseDetails
181 const starReleasing = starReleaseDetails
176 .map((s: any) => (s ? s.total > 0 : false))
182 .map((s: any) => (s ? s.total > 0 : false))
177 .getOrElse(false);
183 .getOrElse(false);
@@ -324,19 +330,17 @@ export default function Points() {
324 </Grid.Item>
330 </Grid.Item>
325 )}
331 )}
326
332
327− {/* {processingPoints.length > 0 && (
333+ {showMigrateNotice && (
328− <Grid.Item full as={Grid} gap={1} className="mv6">
334+ <Grid.Item full as={Box} className={'migrated-info-box'}>
329− <Grid.Item full as={H5}>
335+ <span className={'icon'}>
330− Awaiting L2 Rollup
336+ <Icon icon="Info" />
331− </Grid.Item>
337+ </span>
332− <Grid.Item
338+ <span className={'message'}>
333− full
339+ Not seeing a recently-migrated Layer 2 point? It may take a few
334− as={PointList}
340+ minutes for the public roller to be aware of the transaction.
335− points={processingPoints}
341+ </span>
336− processing
337− />
338 </Grid.Item>
342 </Grid.Item>
339− )} */}
343+ )}
340
344
341 <Footer>
345 <Footer>
342 <Grid>
346 <Grid>