@@ -1,5 +1,6 @@
1import React, { useCallback, useMemo, useState } from 'react';
1import React, { useCallback, useMemo, useState } from 'react';
2import * as need from 'lib/need';
2import * as need from 'lib/need';
3+import cn from 'classnames';
4import ActivateView from './ActivateView';
5import ActivateView from './ActivateView';
5import { Box, Text } from '@tlon/indigo-react';
6import { Box, Text } from '@tlon/indigo-react';
@@ -23,6 +24,8 @@ import View from 'components/View';
23import NavHeader from 'components/NavHeader';
24import NavHeader from 'components/NavHeader';
24import { MiniBackButton } from 'components/MiniBackButton';
25import { MiniBackButton } from 'components/MiniBackButton';
27+import './MasterKeyConfirm.scss';
26const MasterKeyConfirm = () => {
29const MasterKeyConfirm = () => {
27 const { derivedWallet, setIsIn } = useActivateFlow();
30 const { derivedWallet, setIsIn } = useActivateFlow();
28 const { ticket } = need.wallet(derivedWallet);
31 const { ticket } = need.wallet(derivedWallet);
@@ -90,7 +93,7 @@ const MasterKeyConfirm = () => {
90 useFadeIn();
93 useFadeIn();
93− <View centered={true}>
96+ <View centered={true} id={'master-key-confirm'}>
94 <NavHeader>
97 <NavHeader>
95 <Box marginBottom={'10px'}>
98 <Box marginBottom={'10px'}>
96 <MiniBackButton
99 <MiniBackButton
@@ -105,13 +108,7 @@ const MasterKeyConfirm = () => {
105 header={header}
108 header={header}
106 gridRows={'20% 80%'}
109 gridRows={'20% 80%'}
107 gridAreas={"'header' 'content'"}>
110 gridAreas={"'header' 'content'"}>
108− <Box
111+ <Box className={'content'}>
109− alignItems={'center'}
111− flexDirection={'column'}
114− justifyContent={'center'}>
115 <BridgeForm
112 <BridgeForm
117 display: 'flex',
114 display: 'flex',
@@ -126,34 +123,14 @@ const MasterKeyConfirm = () => {
126 onValues={onValues}
123 onValues={onValues}
127 initialValues={initialValues}>
124 initialValues={initialValues}>
128 {({ handleSubmit, valid }) => (
125 {({ handleSubmit, valid }) => (
129− <Box
126+ <Box className="form-inner">
130− display={'grid'}
127+ <Box className="inputs-outer">
131− gridTemplateAreas={"'inputs' 'submit'"}
132− gridTemplateColumns={'1fr'}
133− gridTemplateRows={'80% 20%'}
139− flexDirection={'column'}
142− alignItems={'center'}
143− justifyContent={'center'}>
144 {showError && (
128 {showError && (
145 <Box height={'24px'}>
129 <Box height={'24px'}>
146 {/* this is a flexbox placeholder to balance the error message below*/}
130 {/* this is a flexbox placeholder to balance the error message below*/}
149− <Box
133+ <Box className="inputs-inner">
151− flexDirection={'row'}
153− height={'min-content'}
156− justifyContent={'center'}>
157 {ticketSegments.map((segment, i) => {
134 {ticketSegments.map((segment, i) => {
@@ -162,18 +139,9 @@ const MasterKeyConfirm = () => {
162 flexDirection={'row'}
139 flexDirection={'row'}
163 flexWrap={'nowrap'}>
140 flexWrap={'nowrap'}>
164 <TicketSegmentInput
141 <TicketSegmentInput
165− width={'75px'}
142+ className={cn('ticket-input', {
166− paddingY={'18px'}
143+ 'has-error': showError,
169− fontFamily={'Source Code Pro'}
170− borderRadius={'5px'}
171− border={'solid 1px rgba(0,0,0,0.25)'}
173− showError ? '#FF4136' : 'rgba(0,0,0,0.25)'
175− color={showError ? '#FF4136' : 'rgba(0,0,0,0.95)'}
176− backgroundColor={showError ? '#FF41360D' : '#FFF'}
177 name={`ticket${i}`}
145 name={`ticket${i}`}
178 autoFocus={i === 0}
146 autoFocus={i === 0}
@@ -192,12 +160,7 @@ const MasterKeyConfirm = () => {
193 {showError && (
161 {showError && (
195− <Text
163+ <Text className="error-message">
197− fontFamily={'Inter'}
200− lineHeight={'24px'}>
201 The Master Ticket you entered is incorrect
164 The Master Ticket you entered is incorrect