@@ -5,8 +5,6 @@ import * as ob from 'urbit-ob';
55import * as need from '../lib/need';
66
77import {
8− Row,
9− Col,
108 H1,
119 P,
1210 Anchor,
@@ -27,6 +25,7 @@ import { isValidAddress } from '../lib/wallet';
2725import { withNetwork } from '../store/network';
2826import { compose } from '../lib/lib';
2927import { withPointCursor } from '../store/pointCursor';
28+import View from 'components/View';
3029
3130const setFind = (set, pred) => {
3231 for (const e of set) {
@@ -41,7 +40,7 @@ class IssueChild extends React.Component {
4140 constructor(props) {
4241 super(props);
4342
44− const issuingPoint = parseInt(need.pointCursor(props), 10);
43+ const issuingPoint = need.pointCursor(props.pointCursor);
4544
4645 const getCandidate = () => ob.patp(getSpawnCandidate(issuingPoint));
4746
@@ -76,7 +75,7 @@ class IssueChild extends React.Component {
7675 componentWillMount() {
7776 const { issuingPoint } = this.state;
7877
79− const validContracts = need.contracts(this.props);
78+ const validContracts = need.contracts(this.props.contracts);
8079
8180 azimuth
8281 .getUnspawnedChildren(validContracts, issuingPoint)
@@ -110,7 +109,7 @@ class IssueChild extends React.Component {
110109 if (state.isAvailable === false) return Nothing();
111110 if (canDecodePatp(state.desiredPoint) === false) return Nothing();
112111
113− const validContracts = need.contracts(props);
112+ const validContracts = need.contracts(props.contracts);
114113
115114 const pointDec = ob.patp2dec(state.desiredPoint);
116115
@@ -163,92 +162,88 @@ class IssueChild extends React.Component {
163162 : 'etherscan.io';
164163
165164 return (
166− <Row>
167− <Col>
168− <H1>
169− {'Issue a Child From '}{' '}
170− <code>{`${ob.patp(state.issuingPoint)}`}</code>
171− </H1>
172−
173− <P>
174− {`Please enter the point you would like to issue, and specify the
165+ <View>
166+ <H1>
167+ {'Issue a Child From '}{' '}
168+ <code>{`${ob.patp(state.issuingPoint)}`}</code>
169+ </H1>
170+
171+ <P>
172+ {`Please enter the point you would like to issue, and specify the
175173 receiving Ethereum address. If you need to create an address, you
176174 can also use Wallet Generator.`}
177− </P>
175+ </P>
178176
179− <P>
180− {`Your point can only issue children with particular names. Some
177+ <P>
178+ {`Your point can only issue children with particular names. Some
181179 valid suggestions for `}
182− {<code>{ob.patp(state.issuingPoint)}</code>}
183− {' are '}
184− <code>{state.suggestions[0]}</code>
185− {', '}
186− <code>{state.suggestions[1]}</code>
187− {', and '}
188− <code>{state.suggestions[2]}</code>
189− {'.'}
190− </P>
191−
192− <PointInput
193− prop-size="lg"
194− prop-format="innerLabel"
195− className={'mono mt-8'}
196− placeholder={`e.g. ${state.suggestions[3]}`}
197− value={state.desiredPoint}
198− onChange={this.handlePointInput}>
199− <InnerLabel>{'Point to Issue'}</InnerLabel>
200− <div
201− style={{
202− marginTop: '8.8rem',
203− marginLeft: '4.6rem',
204− fontSize: '5rem',
205− color: '#757575',
206− whiteSpace: 'pre-wrap',
207− }}
208− className="abs tl-0 mono">
209− {state.autoComplete}
210− </div>
211− <ValidatedSigil
212− className={'tr-0 mt-05 mr-0 abs'}
213− patp={state.desiredPoint}
214− size={68}
215− margin={8}
216− validator={() => this.validatePoint(state.desiredPoint)}
217− />
218− </PointInput>
219−
220− <AddressInput
221− className="text-mono mt-8"
222− prop-size="lg"
223− prop-format="innerLabel"
224− placeholder={`e.g. 0x84295d5e054d8cff5a22428b195f5a1615bd644f`}
225− value={state.receivingAddress}
226− disabled={
227− Nothing.hasInstance(state.isAvailable) || !state.isAvailable.value
228− }
229− onChange={v => this.handleAddressInput(v)}>
230− <InnerLabel>{'Receiving Address'}</InnerLabel>
231− <ShowBlockie className={'mt-1'} address={state.receivingAddress} />
232− </AddressInput>
233−
234− <Anchor
235− className={'mt-1'}
236− prop-size={'sm'}
237− prop-disabled={
238− !isValidAddress(state.receivingAddress) || !esvisible
239− }
240− target={'_blank'}
241− href={`https://${esdomain}/address/${state.receivingAddress}`}>
242− {'View on Etherscan ↗'}
243− </Anchor>
244−
245− <StatelessTransaction
246− canGenerate={canGenerate}
247− createUnsignedTxn={this.createUnsignedTxn}
248− ref={this.statelessRef}
180+ {<code>{ob.patp(state.issuingPoint)}</code>}
181+ {' are '}
182+ <code>{state.suggestions[0]}</code>
183+ {', '}
184+ <code>{state.suggestions[1]}</code>
185+ {', and '}
186+ <code>{state.suggestions[2]}</code>
187+ {'.'}
188+ </P>
189+
190+ <PointInput
191+ prop-size="lg"
192+ prop-format="innerLabel"
193+ className={'mono mt-8'}
194+ placeholder={`e.g. ${state.suggestions[3]}`}
195+ value={state.desiredPoint}
196+ onChange={this.handlePointInput}>
197+ <InnerLabel>{'Point to Issue'}</InnerLabel>
198+ <div
199+ style={{
200+ marginTop: '8.8rem',
201+ marginLeft: '4.6rem',
202+ fontSize: '5rem',
203+ color: '#757575',
204+ whiteSpace: 'pre-wrap',
205+ }}
206+ className="abs tl-0 mono">
207+ {state.autoComplete}
208+ </div>
209+ <ValidatedSigil
210+ className={'tr-0 mt-05 mr-0 abs'}
211+ patp={state.desiredPoint}
212+ size={68}
213+ margin={8}
214+ validator={() => this.validatePoint(state.desiredPoint)}
249215 />
250− </Col>
251− </Row>
216+ </PointInput>
217+
218+ <AddressInput
219+ className="text-mono mt-8"
220+ prop-size="lg"
221+ prop-format="innerLabel"
222+ placeholder={`e.g. 0x84295d5e054d8cff5a22428b195f5a1615bd644f`}
223+ value={state.receivingAddress}
224+ disabled={
225+ Nothing.hasInstance(state.isAvailable) || !state.isAvailable.value
226+ }
227+ onChange={v => this.handleAddressInput(v)}>
228+ <InnerLabel>{'Receiving Address'}</InnerLabel>
229+ <ShowBlockie className={'mt-1'} address={state.receivingAddress} />
230+ </AddressInput>
231+
232+ <Anchor
233+ className={'mt-1'}
234+ prop-size={'sm'}
235+ prop-disabled={!isValidAddress(state.receivingAddress) || !esvisible}
236+ target={'_blank'}
237+ href={`https://${esdomain}/address/${state.receivingAddress}`}>
238+ {'View on Etherscan ↗'}
239+ </Anchor>
240+
241+ <StatelessTransaction
242+ canGenerate={canGenerate}
243+ createUnsignedTxn={this.createUnsignedTxn}
244+ ref={this.statelessRef}
245+ />
246+ </View>
252247 );
253248 }
254249}