@@ -1,84 +0,0 @@
1−import React, { useCallback } from 'react';
2−import cn from 'classnames';
3−import { Grid, Text } from 'indigo-react';
4−import * as azimuth from 'azimuth-js';
6−import { useNetwork } from 'store/network';
7−import { usePointCursor } from 'store/pointCursor';
8−import { usePointCache } from 'store/pointCache';
10−import * as need from 'lib/need';
11−import { useLocalRouter } from 'lib/LocalRouter';
12−import useCurrentPointName from 'lib/useCurrentPointName';
13−import useEthereumTransaction from 'lib/useEthereumTransaction';
14−import { GAS_LIMITS } from 'lib/constants';
15−import { ETH_ZERO_ADDR } from 'lib/wallet';
16−import useLifecycle from 'lib/useLifecycle';
18−import ViewHeader from 'components/ViewHeader';
19−import InlineEthereumTransaction from 'components/InlineEthereumTransaction';
21−function useCancelTransfer() {
22− const { contracts } = useNetwork();
23− const { pointCursor } = usePointCursor();
24− const { syncDetails } = usePointCache();
26− const _contracts = need.contracts(contracts);
27− const _point = need.point(pointCursor);
29− const { construct, ...rest } = useEthereumTransaction(
32− azimuth.ecliptic.setTransferProxy(_contracts, _point, ETH_ZERO_ADDR),
35− useCallback(() => syncDetails(_point), [_point, syncDetails]),
48−export default function AdminCancelTransfer() {
49− const { pop } = useLocalRouter();
50− const { getDetails } = usePointCache();
51− const { pointCursor } = usePointCursor();
52− const _point = need.point(pointCursor);
54− const name = useCurrentPointName();
55− const _details = need.details(getDetails(_point));
57− const { completed, bind } = useCancelTransfer();
61− <Grid.Item full as={ViewHeader}>
62− Cancel Outgoing Transfer
68− className={cn('f5 wrap', {
72− ? `The outgoing transfer of ${name} has been cancelled.`
73− : `Cancel the outgoing transfer of ${name} to ${_details.transferProxy}.`}
78− as={InlineEthereumTransaction}
80− onReturn={() => pop()}