@@ -20,6 +20,8 @@ import {
20} from 'views/Invite/useInvites';
20} from 'views/Invite/useInvites';
21import { usePointCache } from 'store/pointCache';
21import { usePointCache } from 'store/pointCache';
22import { CreatingInvitesModal } from './CreatingInvitesModal';
22import { CreatingInvitesModal } from './CreatingInvitesModal';
23+import { useWallet } from 'store/wallet';
24+import { WALLET_TYPES } from 'lib/constants';
24interface StarMap {
26interface StarMap {
25 [key: string]: {
27 [key: string]: {
@@ -52,6 +54,9 @@ function allChildrenSelected(selected: string[], childrenPatps: string[]) {
53export const InviteConverter = ({ points }: InviteConverterProps) => {
55export const InviteConverter = ({ points }: InviteConverterProps) => {
54 const { syncControlledPoints }: any = usePointCache();
56 const { syncControlledPoints }: any = usePointCache();
57+ const { walletType }: any = useWallet();
58+ const signatureFree =
59+ walletType === WALLET_TYPES.TICKET || walletType === WALLET_TYPES.SHARDS;
55 const { api, getPendingTransactions, getAndUpdatePoint } = useRoller();
60 const { api, getPendingTransactions, getAndUpdatePoint } = useRoller();
56 const { inviteJobs } = useInviteStore();
61 const { inviteJobs } = useInviteStore();
57 const { generateInviteCodes } = useInvites();
62 const { generateInviteCodes } = useInvites();
@@ -134,7 +139,6 @@ export const InviteConverter = ({ points }: InviteConverterProps) => {
136 for (const { point, children } of Object.values(starMap)) {
141 for (const { point, children } of Object.values(starMap)) {
138 const filtered = children
142 const filtered = children
139 .filter(p => selected.includes(p.patp))
143 .filter(p => selected.includes(p.patp))
140 .map(p => p.value);
144 .map(p => p.value);
@@ -201,7 +205,7 @@ export const InviteConverter = ({ points }: InviteConverterProps) => {
202 @ts-ignore */}
206 @ts-ignore */}
203 <Button className="create-invites" center onClick={() => setShow(true)}>
207 <Button className="create-invites" center onClick={() => setShow(true)}>
204− Create Invites from Planets
208+ Update Invites
205 </Button>
209 </Button>
206 <Modal small show={show} hide={() => setShow(false)}>
210 <Modal small show={show} hide={() => setShow(false)}>
207 <BodyPane p={0}>
211 <BodyPane p={0}>
@@ -209,7 +213,7 @@ export const InviteConverter = ({ points }: InviteConverterProps) => {
209 <Row alignItems="center" mb={3}>
213 <Row alignItems="center" mb={3}>
210 <InviteIcon />
214 <InviteIcon />
211 <Text bold ml={2}>
215 <Text bold ml={2}>
212− Create Invites for Existing Planets
216+ Updates invites for planets
215 <Text mb={5}>
219 <Text mb={5}>
@@ -220,9 +224,11 @@ export const InviteConverter = ({ points }: InviteConverterProps) => {
220 keys invalid.
224 keys invalid.
227+ {!signatureFree && (
223− <Text bold className={!!signatureCount ? '' : 'hidden'}>
228+ <Text bold className={!!signatureCount ? '' : 'hidden'}>
224− {signatureCount} manual signatures will be required.
229+ {signatureCount} manual signatures will be required.
227 bg="washedGray"
233 bg="washedGray"
228 height="300px"
234 height="300px"