@@ -5,8 +5,6 @@ import * as ob from 'urbit-ob';
5import * as need from '../lib/need';
5import * as need from '../lib/need';
@@ -27,6 +25,7 @@ import { isValidAddress } from '../lib/wallet';
27import { withNetwork } from '../store/network';
25import { withNetwork } from '../store/network';
28import { compose } from '../lib/lib';
26import { compose } from '../lib/lib';
29import { withPointCursor } from '../store/pointCursor';
27import { withPointCursor } from '../store/pointCursor';
28+import View from 'components/View';
31const setFind = (set, pred) => {
30const setFind = (set, pred) => {
32 for (const e of set) {
31 for (const e of set) {
@@ -41,7 +40,7 @@ class IssueChild extends React.Component {
41 constructor(props) {
40 constructor(props) {
42 super(props);
41 super(props);
44− const issuingPoint = parseInt(need.pointCursor(props), 10);
43+ const issuingPoint = need.pointCursor(props.pointCursor);
46 const getCandidate = () => ob.patp(getSpawnCandidate(issuingPoint));
45 const getCandidate = () => ob.patp(getSpawnCandidate(issuingPoint));
@@ -76,7 +75,7 @@ class IssueChild extends React.Component {
76 componentWillMount() {
75 componentWillMount() {
77 const { issuingPoint } = this.state;
76 const { issuingPoint } = this.state;
79− const validContracts = need.contracts(this.props);
78+ const validContracts = need.contracts(this.props.contracts);
82 .getUnspawnedChildren(validContracts, issuingPoint)
81 .getUnspawnedChildren(validContracts, issuingPoint)
@@ -110,7 +109,7 @@ class IssueChild extends React.Component {
110 if (state.isAvailable === false) return Nothing();
109 if (state.isAvailable === false) return Nothing();
111 if (canDecodePatp(state.desiredPoint) === false) return Nothing();
110 if (canDecodePatp(state.desiredPoint) === false) return Nothing();
113− const validContracts = need.contracts(props);
112+ const validContracts = need.contracts(props.contracts);
115 const pointDec = ob.patp2dec(state.desiredPoint);
114 const pointDec = ob.patp2dec(state.desiredPoint);
@@ -163,92 +162,88 @@ class IssueChild extends React.Component {
163 : 'etherscan.io';
162 : 'etherscan.io';
169− {'Issue a Child From '}{' '}
167+ {'Issue a Child From '}{' '}
170− <code>{`${ob.patp(state.issuingPoint)}`}</code>
168+ <code>{`${ob.patp(state.issuingPoint)}`}</code>
174− {`Please enter the point you would like to issue, and specify the
172+ {`Please enter the point you would like to issue, and specify the
175 receiving Ethereum address. If you need to create an address, you
173 receiving Ethereum address. If you need to create an address, you
176 can also use Wallet Generator.`}
174 can also use Wallet Generator.`}
180− {`Your point can only issue children with particular names. Some
178+ {`Your point can only issue children with particular names. Some
181 valid suggestions for `}
179 valid suggestions for `}
182− {<code>{ob.patp(state.issuingPoint)}</code>}
180+ {<code>{ob.patp(state.issuingPoint)}</code>}
183− {' are '}
181+ {' are '}
184− <code>{state.suggestions[0]}</code>
182+ <code>{state.suggestions[0]}</code>
186− <code>{state.suggestions[1]}</code>
184+ <code>{state.suggestions[1]}</code>
187− {', and '}
185+ {', and '}
188− <code>{state.suggestions[2]}</code>
186+ <code>{state.suggestions[2]}</code>
192− <PointInput
190+ <PointInput
193− prop-size="lg"
191+ prop-size="lg"
194− prop-format="innerLabel"
192+ prop-format="innerLabel"
195− className={'mono mt-8'}
193+ className={'mono mt-8'}
196− placeholder={`e.g. ${state.suggestions[3]}`}
194+ placeholder={`e.g. ${state.suggestions[3]}`}
197− value={state.desiredPoint}
195+ value={state.desiredPoint}
198− onChange={this.handlePointInput}>
196+ onChange={this.handlePointInput}>
199− <InnerLabel>{'Point to Issue'}</InnerLabel>
197+ <InnerLabel>{'Point to Issue'}</InnerLabel>
201− style={{
199+ style={{
202− marginTop: '8.8rem',
200+ marginTop: '8.8rem',
203− marginLeft: '4.6rem',
201+ marginLeft: '4.6rem',
204− fontSize: '5rem',
202+ fontSize: '5rem',
205− color: '#757575',
203+ color: '#757575',
206− whiteSpace: 'pre-wrap',
204+ whiteSpace: 'pre-wrap',
208− className="abs tl-0 mono">
206+ className="abs tl-0 mono">
209− {state.autoComplete}
207+ {state.autoComplete}
211− <ValidatedSigil
209+ <ValidatedSigil
212− className={'tr-0 mt-05 mr-0 abs'}
210+ className={'tr-0 mt-05 mr-0 abs'}
213− patp={state.desiredPoint}
211+ patp={state.desiredPoint}
214− size={68}
212+ size={68}
215− margin={8}
213+ margin={8}
216− validator={() => this.validatePoint(state.desiredPoint)}
214+ validator={() => this.validatePoint(state.desiredPoint)}
221− className="text-mono mt-8"
223− prop-format="innerLabel"
224− placeholder={`e.g. 0x84295d5e054d8cff5a22428b195f5a1615bd644f`}
225− value={state.receivingAddress}
227− Nothing.hasInstance(state.isAvailable) || !state.isAvailable.value
229− onChange={v => this.handleAddressInput(v)}>
230− <InnerLabel>{'Receiving Address'}</InnerLabel>
231− <ShowBlockie className={'mt-1'} address={state.receivingAddress} />
238− !isValidAddress(state.receivingAddress) || !esvisible
241− href={`https://${esdomain}/address/${state.receivingAddress}`}>
242− {'View on Etherscan ↗'}
245− <StatelessTransaction
246− canGenerate={canGenerate}
247− createUnsignedTxn={this.createUnsignedTxn}
248− ref={this.statelessRef}
250− </Col>
216+ </PointInput>
219+ className="text-mono mt-8"
221+ prop-format="innerLabel"
222+ placeholder={`e.g. 0x84295d5e054d8cff5a22428b195f5a1615bd644f`}
223+ value={state.receivingAddress}
225+ Nothing.hasInstance(state.isAvailable) || !state.isAvailable.value
227+ onChange={v => this.handleAddressInput(v)}>
228+ <InnerLabel>{'Receiving Address'}</InnerLabel>
229+ <ShowBlockie className={'mt-1'} address={state.receivingAddress} />
235+ prop-disabled={!isValidAddress(state.receivingAddress) || !esvisible}
237+ href={`https://${esdomain}/address/${state.receivingAddress}`}>
238+ {'View on Etherscan ↗'}
241+ <StatelessTransaction
242+ canGenerate={canGenerate}
243+ createUnsignedTxn={this.createUnsignedTxn}
244+ ref={this.statelessRef}