on master help sign in
Rename /lib/need functions and usage
d5bb617Fang
src/bridge/components/StatelessTransaction.js+3−3
@@ -1,7 +1,7 @@
1import { Nothing, Just } from 'folktale/maybe'
1import { Nothing, Just } from 'folktale/maybe'
2import { Ok } from 'folktale/result'
2import { Ok } from 'folktale/result'
3import React from 'react'
3import React from 'react'
4−import * as n from '../lib/need'
4+import * as need from '../lib/need'
5
5
6import { Code, H3 } from './Base'
6import { Code, H3 } from './Base'
7import { Button } from './Base'
7import { Button } from './Base'
@@ -65,7 +65,7 @@ class StatelessTransaction extends React.Component {
65 componentDidMount() {
65 componentDidMount() {
66 const { props } = this
66 const { props } = this
67
67
68− const addr = n.needAddress(props);
68+ const addr = need.address(props);
69
69
70 props.web3.matchWith({
70 props.web3.matchWith({
71 Nothing: () => {},
71 Nothing: () => {},
@@ -205,7 +205,7 @@ class StatelessTransaction extends React.Component {
205 const rawTx = hexify(stx.serialize());
205 const rawTx = hexify(stx.serialize());
206 const cost = (state.gasLimit * toWei(state.gasPrice, 'gwei'));
206 const cost = (state.gasLimit * toWei(state.gasPrice, 'gwei'));
207
207
208− const address = n.needAddress(props);
208+ const address = need.address(props);
209 let balance = await web3.eth.getBalance(address);
209 let balance = await web3.eth.getBalance(address);
210 let hasBalance = (balance >= cost);
210 let hasBalance = (balance >= cost);
211
211
src/bridge/lib/keys.js+4−4
@@ -1,6 +1,6 @@
1import BN from 'bn.js'
1import BN from 'bn.js'
2import Maybe from 'folktale/maybe'
2import Maybe from 'folktale/maybe'
3−import * as n from '../lib/need'
3+import * as need from '../lib/need'
4
4
5import * as noun from '../nockjs/noun'
5import * as noun from '../nockjs/noun'
6import * as serial from '../nockjs/serial'
6import * as serial from '../nockjs/serial'
@@ -70,8 +70,8 @@ const attemptSeedDerivation = async (next, args) => {
70 //
70 //
71 // following code is intentionally verbose for sake of clarity
71 // following code is intentionally verbose for sake of clarity
72
72
73− const point = n.needPointCursor(args);
73+ const point = need.pointCursor(args);
74− const pointDetails = n.needFromPointCache(args, point);
74+ const pointDetails = need.fromPointCache(args, point);
75
75
76 const revision =
76 const revision =
77 next === true
77 next === true
@@ -95,7 +95,7 @@ const attemptSeedDerivation = async (next, args) => {
95
95
96 } else if (walletType === WALLET_NAMES.MNEMONIC) {
96 } else if (walletType === WALLET_NAMES.MNEMONIC) {
97
97
98− const walProxy = n.needAddress(args);
98+ const walProxy = need.address(args);
99
99
100 const mnemonic = authMnemonic.matchWith({
100 const mnemonic = authMnemonic.matchWith({
101 Just: mnem => mnem.value,
101 Just: mnem => mnem.value,
src/bridge/lib/need.js+13−13
@@ -4,7 +4,7 @@
4
4
5import { BRIDGE_ERROR } from '../lib/error'
5import { BRIDGE_ERROR } from '../lib/error'
6
6
7−function needWeb3(obj) {
7+function web3(obj) {
8 return ('web3' in obj === false)
8 return ('web3' in obj === false)
9 ? (() => { throw BRIDGE_ERROR.MISSING_WEB3 })()
9 ? (() => { throw BRIDGE_ERROR.MISSING_WEB3 })()
10 : obj.web3.matchWith({
10 : obj.web3.matchWith({
@@ -13,7 +13,7 @@ function needWeb3(obj) {
13 });
13 });
14}
14}
15
15
16−function needContracts(obj) {
16+function contracts(obj) {
17 return ('contracts' in obj === false)
17 return ('contracts' in obj === false)
18 ? (() => { throw BRIDGE_ERROR.MISSING_CONTRACTS })()
18 ? (() => { throw BRIDGE_ERROR.MISSING_CONTRACTS })()
19 : obj.contracts.matchWith({
19 : obj.contracts.matchWith({
@@ -22,7 +22,7 @@ function needContracts(obj) {
22 });
22 });
23}
23}
24
24
25−function needWallet(obj) {
25+function wallet(obj) {
26 return ('wallet' in obj === false)
26 return ('wallet' in obj === false)
27 ? (() => { throw BRIDGE_ERROR.MISSING_WALLET })()
27 ? (() => { throw BRIDGE_ERROR.MISSING_WALLET })()
28 : obj.wallet.matchWith({
28 : obj.wallet.matchWith({
@@ -31,11 +31,11 @@ function needWallet(obj) {
31 });
31 });
32}
32}
33
33
34−function needAddress(obj) {
34+function address(obj) {
35− return needWallet(obj).address;
35+ return wallet(obj).address;
36}
36}
37
37
38−function needPointCursor(obj) {
38+function pointCursor(obj) {
39 return ('pointCursor' in obj === false)
39 return ('pointCursor' in obj === false)
40 ? (() => { throw BRIDGE_ERROR.MISSING_POINT })()
40 ? (() => { throw BRIDGE_ERROR.MISSING_POINT })()
41 : obj.pointCursor.matchWith({
41 : obj.pointCursor.matchWith({
@@ -44,7 +44,7 @@ function needPointCursor(obj) {
44 });
44 });
45}
45}
46
46
47−function needFromPointCache(obj, point) {
47+function fromPointCache(obj, point) {
48 return ('pointCache' in obj === false)
48 return ('pointCache' in obj === false)
49 ? (() => { throw BRIDGE_ERROR.MISSING_POINT })()
49 ? (() => { throw BRIDGE_ERROR.MISSING_POINT })()
50 : point in obj.pointCache
50 : point in obj.pointCache
@@ -53,10 +53,10 @@ function needFromPointCache(obj, point) {
53}
53}
54
54
55export {
55export {
56− needWeb3,
56+ web3,
57− needContracts,
57+ contracts,
58− needWallet,
58+ wallet,
59− needAddress,
59+ address,
60− needPointCursor,
60+ pointCursor,
61− needFromPointCache
61+ fromPointCache
62}
62}
src/bridge/lib/router.js+2−2
@@ -1,5 +1,5 @@
1import * as ob from 'urbit-ob'
1import * as ob from 'urbit-ob'
2−import * as n from '../lib/need'
2+import * as need from '../lib/need'
3
3
4import React from 'react';
4import React from 'react';
5
5
@@ -168,7 +168,7 @@ const renderRoute = (props, route) => {
168 ? 'View'
168 ? 'View'
169
169
170 : route === ROUTE_NAMES.SHIP
170 : route === ROUTE_NAMES.SHIP
171− ? ob.patp(n.needPointCursor(props))
171+ ? ob.patp(need.pointCursor(props))
172
172
173 : route === ROUTE_NAMES.SET_TRANSFER_PROXY
173 : route === ROUTE_NAMES.SET_TRANSFER_PROXY
174 || route === ROUTE_NAMES.SET_MANAGEMENT_PROXY
174 || route === ROUTE_NAMES.SET_MANAGEMENT_PROXY
src/bridge/views/AcceptTransfer.js+5−5
@@ -4,7 +4,7 @@ import { Row, Col, H1, P } from '../components/Base'
4import { InnerLabel, AddressInput, ShowBlockie, Anchor } from '../components/Base'
4import { InnerLabel, AddressInput, ShowBlockie, Anchor } from '../components/Base'
5import * as azimuth from 'azimuth-js'
5import * as azimuth from 'azimuth-js'
6import * as ob from 'urbit-ob'
6import * as ob from 'urbit-ob'
7−import * as n from '../lib/need'
7+import * as need from '../lib/need'
8
8
9import StatelessTransaction from '../components/StatelessTransaction'
9import StatelessTransaction from '../components/StatelessTransaction'
10import { NETWORK_NAMES } from '../lib/network'
10import { NETWORK_NAMES } from '../lib/network'
@@ -14,9 +14,9 @@ class AcceptTransfer extends React.Component {
14 constructor(props) {
14 constructor(props) {
15 super(props)
15 super(props)
16
16
17− const receivingAddress = n.needAddress(props);
17+ const receivingAddress = need.address(props);
18
18
19− const incomingPoint = n.needPointCursor(props);
19+ const incomingPoint = need.pointCursor(props);
20
20
21 this.state = {
21 this.state = {
22 receivingAddress: receivingAddress,
22 receivingAddress: receivingAddress,
@@ -36,9 +36,9 @@ class AcceptTransfer extends React.Component {
36 createUnsignedTxn() {
36 createUnsignedTxn() {
37 const { state, props } = this
37 const { state, props } = this
38
38
39− const validContracts = n.needContracts(props);
39+ const validContracts = need.contracts(props);
40
40
41− const validPoint = n.needPointCursor(props); //TODO state.incomingPoint ?
41+ const validPoint = need.pointCursor(props); //TODO state.incomingPoint ?
42
42
43 return Just(azimuth.ecliptic.transferPoint(
43 return Just(azimuth.ecliptic.transferPoint(
44 validContracts,
44 validContracts,
src/bridge/views/CancelTransfer.js+4−4
@@ -3,7 +3,7 @@ import React from 'react'
3import { Row, Col, H1, P } from '../components/Base'
3import { Row, Col, H1, P } from '../components/Base'
4import * as azimuth from 'azimuth-js'
4import * as azimuth from 'azimuth-js'
5import * as ob from 'urbit-ob'
5import * as ob from 'urbit-ob'
6−import * as n from '../lib/need'
6+import * as need from '../lib/need'
7
7
8import StatelessTransaction from '../components/StatelessTransaction'
8import StatelessTransaction from '../components/StatelessTransaction'
9import { ETH_ZERO_ADDR } from '../lib/wallet'
9import { ETH_ZERO_ADDR } from '../lib/wallet'
@@ -12,7 +12,7 @@ class CancelTransfer extends React.Component {
12 constructor(props) {
12 constructor(props) {
13 super(props)
13 super(props)
14
14
15− const pointInTransfer = n.needPointCursor(props);
15+ const pointInTransfer = need.pointCursor(props);
16
16
17 this.state = {
17 this.state = {
18 proxyAddress: '',
18 proxyAddress: '',
@@ -25,9 +25,9 @@ class CancelTransfer extends React.Component {
25 createUnsignedTxn() {
25 createUnsignedTxn() {
26 const { props } = this
26 const { props } = this
27
27
28− const validContracts = n.needContracts(props);
28+ const validContracts = need.contracts(props);
29
29
30− const validPoint = n.needPointCursor(props); //TODO this.state.pointInTransfer ?
30+ const validPoint = need.pointCursor(props); //TODO this.state.pointInTransfer ?
31
31
32 const txn = azimuth.ecliptic.setTransferProxy(
32 const txn = azimuth.ecliptic.setTransferProxy(
33 validContracts,
33 validContracts,
src/bridge/views/CreateGalaxy.js+4−4
@@ -2,7 +2,7 @@ import React from 'react'
2import Maybe from 'folktale/maybe'
2import Maybe from 'folktale/maybe'
3import * as azimuth from 'azimuth-js'
3import * as azimuth from 'azimuth-js'
4import * as ob from 'urbit-ob'
4import * as ob from 'urbit-ob'
5−import * as n from '../lib/need'
5+import * as need from '../lib/need'
6
6
7import { Button, } from '../components/Base'
7import { Button, } from '../components/Base'
8import { Row, Col, H1, P, Anchor } from '../components/Base'
8import { Row, Col, H1, P, Anchor } from '../components/Base'
@@ -41,7 +41,7 @@ class CreateGalaxy extends React.Component {
41 constructor(props) {
41 constructor(props) {
42 super(props)
42 super(props)
43
43
44− const galaxyOwner = n.needAddress(props);
44+ const galaxyOwner = need.address(props);
45
45
46 this.state = {
46 this.state = {
47 galaxyOwner: galaxyOwner,
47 galaxyOwner: galaxyOwner,
@@ -73,7 +73,7 @@ class CreateGalaxy extends React.Component {
73 if (canDecodePatp(state.galaxyName) === false) return Maybe.Nothing()
73 if (canDecodePatp(state.galaxyName) === false) return Maybe.Nothing()
74 if (isValidGalaxy(state.galaxyName) === false) return Maybe.Nothing()
74 if (isValidGalaxy(state.galaxyName) === false) return Maybe.Nothing()
75
75
76− const validContracts = n.needContracts(props);
76+ const validContracts = need.contracts(props);
77
77
78 const galaxyDec = parseInt(ob.patp2dec(state.galaxyName), 10)
78 const galaxyDec = parseInt(ob.patp2dec(state.galaxyName), 10)
79
79
@@ -94,7 +94,7 @@ class CreateGalaxy extends React.Component {
94 return
94 return
95 }
95 }
96
96
97− const validContracts = n.needContracts(props);
97+ const validContracts = need.contracts(props);
98
98
99 const galaxyDec = ob.patp2dec(state.galaxyName)
99 const galaxyDec = ob.patp2dec(state.galaxyName)
100
100
src/bridge/views/GenKeyfile.js+3−3
@@ -1,6 +1,6 @@
1import React from 'react'
1import React from 'react'
2import Maybe from 'folktale/maybe'
2import Maybe from 'folktale/maybe'
3−import * as n from '../lib/need'
3+import * as need from '../lib/need'
4
4
5import { Button } from '../components/Base'
5import { Button } from '../components/Base'
6import { Row, Col, H1, P } from '../components/Base'
6import { Row, Col, H1, P } from '../components/Base'
@@ -25,9 +25,9 @@ class GenKeyfile extends React.Component {
25 }
25 }
26
26
27 getPointDetails() {
27 getPointDetails() {
28− const point = n.needPointCursor(this.props);
28+ const point = need.pointCursor(this.props);
29
29
30− const pointDetails = n.needFromPointCache(this.props, point);
30+ const pointDetails = need.fromPointCache(this.props, point);
31
31
32 // in case we did SetKeys earlier this session, make sure to generate the
32 // in case we did SetKeys earlier this session, make sure to generate the
33 // newer keyfile, rather than the one that will expire soon
33 // newer keyfile, rather than the one that will expire soon
src/bridge/views/InviteTicket.js+2−2
@@ -3,7 +3,7 @@ import React from 'react'
3import { InnerLabel, Warning, TicketInput,
3import { InnerLabel, Warning, TicketInput,
4 VerifyTicketInput, Button, Row, Col, Passport } from '../components/Base'
4 VerifyTicketInput, Button, Row, Col, Passport } from '../components/Base'
5import * as azimuth from 'azimuth-js'
5import * as azimuth from 'azimuth-js'
6−import * as n from '../lib/need'
6+import * as need from '../lib/need'
7
7
8import { randomPatq } from '../lib/lib'
8import { randomPatq } from '../lib/lib'
9import { ROUTE_NAMES } from '../lib/router'
9import { ROUTE_NAMES } from '../lib/router'
@@ -87,7 +87,7 @@ class InviteTicket extends React.Component {
87
87
88 const addr = inviteWallet.address;
88 const addr = inviteWallet.address;
89
89
90− const ctrcs = n.needContracts(this.props);
90+ const ctrcs = need.contracts(this.props);
91
91
92 const incoming = await azimuth.azimuth.getTransferringFor(ctrcs, addr)
92 const incoming = await azimuth.azimuth.getTransferringFor(ctrcs, addr)
93
93
src/bridge/views/InvitesManage.js+3−3
@@ -2,7 +2,7 @@ import { Just, Nothing } from 'folktale/maybe'
2import React from 'react'
2import React from 'react'
3import * as ob from 'urbit-ob'
3import * as ob from 'urbit-ob'
4import * as azimuth from 'azimuth-js'
4import * as azimuth from 'azimuth-js'
5−import * as n from '../lib/need'
5+import * as need from '../lib/need'
6
6
7import { Row, Col, Warning, Input,
7import { Row, Col, Warning, Input,
8 PointInput, InnerLabel, ValidatedSigil } from '../components/Base'
8 PointInput, InnerLabel, ValidatedSigil } from '../components/Base'
@@ -32,8 +32,8 @@ class InvitesManage extends React.Component {
32 }
32 }
33
33
34 componentDidMount() {
34 componentDidMount() {
35− this.point = n.needPointCursor(this.props);
35+ this.point = need.pointCursor(this.props);
36− this.contracts = n.needContracts(this.props);
36+ this.contracts = need.contracts(this.props);
37
37
38 azimuth.azimuth.isSpawnProxy(
38 azimuth.azimuth.isSpawnProxy(
39 this.contracts,
39 this.contracts,
src/bridge/views/InvitesSend.js+5−5
@@ -1,7 +1,7 @@
1import { Just, Nothing } from 'folktale/maybe'
1import { Just, Nothing } from 'folktale/maybe'
2import React from 'react'
2import React from 'react'
3import * as azimuth from 'azimuth-js'
3import * as azimuth from 'azimuth-js'
4−import * as n from '../lib/need'
4+import * as need from '../lib/need'
5
5
6import { hasReceived, sendMail } from '../lib/inviteMail'
6import { hasReceived, sendMail } from '../lib/inviteMail'
7import { Row, Col, Button, Input, H3, Warning } from '../components/Base'
7import { Row, Col, Button, Input, H3, Warning } from '../components/Base'
@@ -69,10 +69,10 @@ class InvitesSend extends React.Component {
69 }
69 }
70
70
71 componentDidMount() {
71 componentDidMount() {
72− this.point = parseInt(n.needPointCursor(this.props), 10);
72+ this.point = parseInt(need.pointCursor(this.props), 10);
73− this.address = n.needAddress(this.props);
73+ this.address = need.address(this.props);
74− this.contracts = n.needContracts(this.props);
74+ this.contracts = need.contracts(this.props);
75− this.web3 = n.needWeb3(this.props);
75+ this.web3 = need.web3(this.props);
76
76
77 console.log(azimuth.delegatedSending);
77 console.log(azimuth.delegatedSending);
78 azimuth.delegatedSending.getTotalUsableInvites(this.contracts, this.point)
78 azimuth.delegatedSending.getTotalUsableInvites(this.contracts, this.point)
src/bridge/views/IssueChild.js+4−4
@@ -2,7 +2,7 @@ import { Just, Nothing } from 'folktale/maybe'
2import React from 'react'
2import React from 'react'
3import { azimuth, ecliptic } from 'azimuth-js'
3import { azimuth, ecliptic } from 'azimuth-js'
4import * as ob from 'urbit-ob'
4import * as ob from 'urbit-ob'
5−import * as n from '../lib/need'
5+import * as need from '../lib/need'
6
6
7import {
7import {
8 Row, Col, H1, P, Anchor,
8 Row, Col, H1, P, Anchor,
@@ -31,7 +31,7 @@ class IssueChild extends React.Component {
31 constructor(props) {
31 constructor(props) {
32 super(props)
32 super(props)
33
33
34− const issuingPoint = parseInt(n.needPointCursor(props), 10);
34+ const issuingPoint = parseInt(need.pointCursor(props), 10);
35
35
36 const getCandidate = () => ob.patp(getSpawnCandidate(issuingPoint))
36 const getCandidate = () => ob.patp(getSpawnCandidate(issuingPoint))
37
37
@@ -66,7 +66,7 @@ class IssueChild extends React.Component {
66 componentWillMount() {
66 componentWillMount() {
67 const { issuingPoint } = this.state
67 const { issuingPoint } = this.state
68
68
69− const validContracts = n.needContracts(this.props);
69+ const validContracts = need.contracts(this.props);
70
70
71 azimuth.getUnspawnedChildren(validContracts, issuingPoint).then(ps => this.setState({ validChildren: new Set(ps.map(ob.patp)) }))
71 azimuth.getUnspawnedChildren(validContracts, issuingPoint).then(ps => this.setState({ validChildren: new Set(ps.map(ob.patp)) }))
72 }
72 }
@@ -97,7 +97,7 @@ class IssueChild extends React.Component {
97 if (state.isAvailable === false) return Nothing()
97 if (state.isAvailable === false) return Nothing()
98 if (canDecodePatp(state.desiredPoint) === false) return Nothing()
98 if (canDecodePatp(state.desiredPoint) === false) return Nothing()
99
99
100− const validContracts = n.needContracts(props);
100+ const validContracts = need.contracts(props);
101
101
102 const pointDec = ob.patp2dec(state.desiredPoint)
102 const pointDec = ob.patp2dec(state.desiredPoint)
103
103
src/bridge/views/Point.js+2−2
@@ -3,7 +3,7 @@ import React from 'react'
3import { pour } from 'sigil-js'
3import { pour } from 'sigil-js'
4import * as ob from 'urbit-ob'
4import * as ob from 'urbit-ob'
5import * as azimuth from 'azimuth-js'
5import * as azimuth from 'azimuth-js'
6−import * as n from '../lib/need'
6+import * as need from '../lib/need'
7
7
8import PointList from '../components/PointList'
8import PointList from '../components/PointList'
9import ReactSVGComponents from '../components/ReactSVGComponents'
9import ReactSVGComponents from '../components/ReactSVGComponents'
@@ -79,7 +79,7 @@ class Point extends React.Component {
79
79
80 const { spawned } = this.state
80 const { spawned } = this.state
81
81
82− const point = n.needPointCursor(this.props);
82+ const point = need.pointCursor(this.props);
83
83
84 const pointDetails =
84 const pointDetails =
85 point in pointCache
85 point in pointCache
src/bridge/views/Point/Actions.js+2−2
@@ -1,5 +1,5 @@
1import React from 'react'
1import React from 'react'
2−import * as n from '../../lib/need'
2+import * as need from '../../lib/need'
3import {
3import {
4 ETH_ZERO_ADDR,
4 ETH_ZERO_ADDR,
5 CURVE_ZERO_ADDR,
5 CURVE_ZERO_ADDR,
@@ -21,7 +21,7 @@ const Actions = (props) => {
21 point, pointDetails, invites
21 point, pointDetails, invites
22 } = props
22 } = props
23
23
24− const addr = n.needAddress(props);
24+ const addr = need.address(props);
25
25
26 const isOwner = pointDetails.matchWith({
26 const isOwner = pointDetails.matchWith({
27 Nothing: _ => false,
27 Nothing: _ => false,
src/bridge/views/SentTransaction.js+2−2
@@ -1,6 +1,6 @@
1import Maybe from 'folktale/maybe'
1import Maybe from 'folktale/maybe'
2import React from 'react'
2import React from 'react'
3−import * as n from '../lib/need'
3+import * as need from '../lib/need'
4import { Row, Col, H1, H3, P, Warning, Anchor } from '../components/Base'
4import { Row, Col, H1, H3, P, Warning, Anchor } from '../components/Base'
5import { Button } from '../components/Base'
5import { Button } from '../components/Base'
6
6
@@ -128,7 +128,7 @@ const SentTransaction = (props) => {
128
128
129 const promptKeyfile = props.routeData && props.routeData.promptKeyfile
129 const promptKeyfile = props.routeData && props.routeData.promptKeyfile
130
130
131− const w3 = n.needWeb3(props);
131+ const w3 = need.web3(props);
132
132
133 const result = txnHashCursor.matchWith({
133 const result = txnHashCursor.matchWith({
134 Nothing: _ => { throw BRIDGE_ERROR.MISSING_TXN },
134 Nothing: _ => { throw BRIDGE_ERROR.MISSING_TXN },
src/bridge/views/SetKeys.js+6−6
@@ -2,7 +2,7 @@ import React from 'react'
2import Maybe from 'folktale/maybe'
2import Maybe from 'folktale/maybe'
3import * as azimuth from 'azimuth-js'
3import * as azimuth from 'azimuth-js'
4import * as ob from 'urbit-ob'
4import * as ob from 'urbit-ob'
5−import * as n from '../lib/need'
5+import * as need from '../lib/need'
6import { Row, Col, H1, P, Warning, CheckboxButton } from '../components/Base'
6import { Row, Col, H1, P, Warning, CheckboxButton } from '../components/Base'
7
7
8import StatelessTransaction from '../components/StatelessTransaction'
8import StatelessTransaction from '../components/StatelessTransaction'
@@ -16,7 +16,7 @@ class SetKeys extends React.Component {
16 constructor(props) {
16 constructor(props) {
17 super(props)
17 super(props)
18
18
19− const point = n.needPointCursor(props);
19+ const point = need.pointCursor(props);
20
20
21 this.state = {
21 this.state = {
22 auth: '',
22 auth: '',
@@ -43,7 +43,7 @@ class SetKeys extends React.Component {
43
43
44 this.deriveSeed()
44 this.deriveSeed()
45
45
46− const addr = n.needAddress(props);
46+ const addr = need.address(props);
47
47
48 this.determineManagementSeed(props.contracts.value, addr)
48 this.determineManagementSeed(props.contracts.value, addr)
49 }
49 }
@@ -88,9 +88,9 @@ class SetKeys extends React.Component {
88 createUnsignedTxn() {
88 createUnsignedTxn() {
89 const { state, props } = this
89 const { state, props } = this
90
90
91− const validContracts = n.needContracts(props);
91+ const validContracts = need.contracts(props);
92
92
93− const validPoint = n.needPointCursor(props);
93+ const validPoint = need.pointCursor(props);
94
94
95 const hexRegExp = /[0-9A-Fa-f]{64}/g
95 const hexRegExp = /[0-9A-Fa-f]{64}/g
96
96
@@ -123,7 +123,7 @@ class SetKeys extends React.Component {
123 state.networkSeed.length === 64
123 state.networkSeed.length === 64
124 && state.networkSeed.length === 64
124 && state.networkSeed.length === 64
125
125
126− const pointDetails = n.needFromPointCache(props, state.point);
126+ const pointDetails = need.fromPointCache(props, state.point);
127
127
128 return (
128 return (
129 <Row>
129 <Row>
src/bridge/views/SetProxy.js+4−4
@@ -1,6 +1,6 @@
1import Maybe from 'folktale/maybe'
1import Maybe from 'folktale/maybe'
2import React from 'react'
2import React from 'react'
3−import * as n from '../lib/need'
3+import * as need from '../lib/need'
4import * as azimuth from 'azimuth-js'
4import * as azimuth from 'azimuth-js'
5import { Row, Col, H1, P, InnerLabel, ShowBlockie, Anchor, HorizontalSelector } from '../components/Base'
5import { Row, Col, H1, P, InnerLabel, ShowBlockie, Anchor, HorizontalSelector } from '../components/Base'
6import { AddressInput } from '../components/Base'
6import { AddressInput } from '../components/Base'
@@ -36,7 +36,7 @@ class SetProxy extends React.Component {
36 constructor(props) {
36 constructor(props) {
37 super(props)
37 super(props)
38
38
39− const issuingPoint = n.needPointCursor(props);
39+ const issuingPoint = need.pointCursor(props);
40
40
41 this.state = {
41 this.state = {
42 proxyAddress: '',
42 proxyAddress: '',
@@ -67,9 +67,9 @@ class SetProxy extends React.Component {
67 createUnsignedTxn(proxyAddress) {
67 createUnsignedTxn(proxyAddress) {
68 const { state, props } = this
68 const { state, props } = this
69
69
70− const validContracts = n.needContracts(props);
70+ const validContracts = need.contracts(props);
71
71
72− const validPoint = n.needPointCursor(props);
72+ const validPoint = need.pointCursor(props);
73
73
74 const txArgs = [
74 const txArgs = [
75 validContracts,
75 validContracts,
src/bridge/views/Transfer.js+4−4
@@ -2,7 +2,7 @@ import Maybe from 'folktale/maybe'
2import React from 'react'
2import React from 'react'
3import * as azimuth from 'azimuth-js'
3import * as azimuth from 'azimuth-js'
4import * as ob from 'urbit-ob'
4import * as ob from 'urbit-ob'
5−import * as n from '../lib/need'
5+import * as need from '../lib/need'
6
6
7import { Row, Col, H1, InnerLabel, ShowBlockie, P, Anchor } from '../components/Base'
7import { Row, Col, H1, InnerLabel, ShowBlockie, P, Anchor } from '../components/Base'
8import { AddressInput } from '../components/Base'
8import { AddressInput } from '../components/Base'
@@ -18,7 +18,7 @@ class Transfer extends React.Component {
18 constructor(props) {
18 constructor(props) {
19 super(props)
19 super(props)
20
20
21− const issuingPoint = n.needPointCursor(props);
21+ const issuingPoint = need.pointCursor(props);
22
22
23 this.state = {
23 this.state = {
24 receivingAddress: '',
24 receivingAddress: '',
@@ -44,9 +44,9 @@ class Transfer extends React.Component {
44 createUnsignedTxn() {
44 createUnsignedTxn() {
45 const { state, props } = this
45 const { state, props } = this
46
46
47− const validContracts = n.needContracts(props);
47+ const validContracts = need.contracts(props);
48
48
49− const validPoint = n.needPointCursor(props);
49+ const validPoint = need.pointCursor(props);
50
50
51 const txn = azimuth.ecliptic.setTransferProxy(
51 const txn = azimuth.ecliptic.setTransferProxy(
52 validContracts,
52 validContracts,