on master help sign in
- Fix ES6 import warnings
cfb613fChris Johnson
src/Root.js−1
@@ -1,7 +1,6 @@
1import 'babel-polyfill' // required for @ledgerhq/hw-transport-u2f
1import 'babel-polyfill' // required for @ledgerhq/hw-transport-u2f
2
2
3import React from 'react'
3import React from 'react'
4−import ReactDOM from 'react-dom'
5import _ from 'lodash'
4import _ from 'lodash'
6
5
7import Bridge from './bridge/Bridge'
6import Bridge from './bridge/Bridge'
src/bridge/components/StatelessTransaction.js+3−4
@@ -1,4 +1,4 @@
1−import { Maybe, Nothing, Just } from 'folktale/maybe'
1+import { Nothing, Just } from 'folktale/maybe'
2import React from 'react'
2import React from 'react'
3
3
4import { Code, H3 } from './Base'
4import { Code, H3 } from './Base'
@@ -190,9 +190,8 @@ class StatelessTransaction extends React.Component {
190 const { gasPrice, gasLimit, nonce, chainId,
190 const { gasPrice, gasLimit, nonce, chainId,
191 txn, stx, userApproval, showGasDetails } = this.state
191 txn, stx, userApproval, showGasDetails } = this.state
192
192
193− const { setNonce, setChainId, setGasLimit, setGasPrice,
193+ const { setNonce, setChainId, setGasLimit, setGasPrice, toggleGasDetails,
194− submit, toggleGasDetails, setUserApproval,
195− sendTxn, createUnsignedTxn } = this
194+ setUserApproval, sendTxn, createUnsignedTxn } = this
196
195
197 const { state } = this
196 const { state } = this
198
197
src/bridge/views/AcceptTransfer.js+2−4
@@ -1,6 +1,6 @@
1−import { Just, Nothing } from 'folktale/maybe'
1+import { Just } from 'folktale/maybe'
2import React from 'react'
2import React from 'react'
3−import { Row, Col, H1, H3, P, Warning } from '../components/Base'
3+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'
@@ -8,8 +8,6 @@ import * as ob from 'urbit-ob'
8import StatelessTransaction from '../components/StatelessTransaction'
8import StatelessTransaction from '../components/StatelessTransaction'
9import { BRIDGE_ERROR } from '../lib/error'
9import { BRIDGE_ERROR } from '../lib/error'
10import { NETWORK_NAMES } from '../lib/network'
10import { NETWORK_NAMES } from '../lib/network'
11−import { ROUTE_NAMES } from '../lib/router'
12−import { sendSignedTransaction, fromWei } from '../lib/txn'
13import { isValidAddress, addressFromSecp256k1Public } from '../lib/wallet'
11import { isValidAddress, addressFromSecp256k1Public } from '../lib/wallet'
14
12
15class AcceptTransfer extends React.Component {
13class AcceptTransfer extends React.Component {
src/bridge/views/CancelTransfer.js+1−12
@@ -1,23 +1,12 @@
1import Maybe from 'folktale/maybe'
1import Maybe from 'folktale/maybe'
2import React from 'react'
2import React from 'react'
3−import { Row, Col, H1, P, Warning, H3 } from '../components/Base'
3+import { 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
6
7import StatelessTransaction from '../components/StatelessTransaction'
7import StatelessTransaction from '../components/StatelessTransaction'
8import { BRIDGE_ERROR } from '../lib/error'
8import { BRIDGE_ERROR } from '../lib/error'
9import { ETH_ZERO_ADDR } from '../lib/wallet'
9import { ETH_ZERO_ADDR } from '../lib/wallet'
10−import { ROUTE_NAMES } from '../lib/router'
11−
12−import {
13− sendSignedTransaction,
14− fromWei,
15− } from '../lib/txn'
16−
17−import {
18− addressFromSecp256k1Public,
19−} from '../lib/wallet'
20−
21
10
22class CancelTransfer extends React.Component {
11class CancelTransfer extends React.Component {
23 constructor(props) {
12 constructor(props) {
src/bridge/views/CreateGalaxy.js+1−9
@@ -9,16 +9,8 @@ import { InnerLabel, GalaxyInput, AddressInput, ValidatedSigil, ShowBlockie } fr
9import StatelessTransaction from '../components/StatelessTransaction'
9import StatelessTransaction from '../components/StatelessTransaction'
10
10
11import { BRIDGE_ERROR } from '../lib/error'
11import { BRIDGE_ERROR } from '../lib/error'
12−
13import { NETWORK_NAMES } from '../lib/network'
12import { NETWORK_NAMES } from '../lib/network'
14−
15−import {
16− sendSignedTransaction,
17− getTxnInfo,
18− canDecodePatp
13+import { canDecodePatp } from '../lib/txn'
19−} from '../lib/txn'
20−
21−import { ROUTE_NAMES } from '../lib/router'
22
14
23import {
15import {
24 addressFromSecp256k1Public,
16 addressFromSecp256k1Public,
src/bridge/views/GenKeyfile.js+1−3
@@ -2,9 +2,7 @@ import React from 'react'
2import Maybe from 'folktale/maybe'
2import Maybe from 'folktale/maybe'
3
3
4import { Button } from '../components/Base'
4import { Button } from '../components/Base'
5−import { RequiredInput, InnerLabel } from '../components/Base'
6import { Row, Col, H1, P } from '../components/Base'
5import { Row, Col, H1, P } from '../components/Base'
7−import { Code } from '../components/Base'
8
6
9import * as ob from 'urbit-ob'
7import * as ob from 'urbit-ob'
10import * as kg from '../../../node_modules/urbit-key-generation/dist/index'
8import * as kg from '../../../node_modules/urbit-key-generation/dist/index'
@@ -96,7 +94,7 @@ class GenKeyfile extends React.Component {
96 }
94 }
97
95
98 render() {
96 render() {
99− const { point, pointDetails, revision } = this.getPointDetails();
97+ const { point, revision } = this.getPointDetails();
100 const { keyfile, loaded } = this.state
98 const { keyfile, loaded } = this.state
101
99
102 return (
100 return (
src/bridge/views/IssueChild.js+3−5
@@ -3,23 +3,21 @@ import 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
5
6−import { Row, Col, H1, H3, P, Anchor, Warning } from '../components/Base'
6+import { Row, Col, H1, P, Anchor } from '../components/Base'
7import { Button, ShowBlockie, ValidatedSigil } from '../components/Base'
7import { Button, ShowBlockie, ValidatedSigil } from '../components/Base'
8import { PointInput, AddressInput, InnerLabel } from '../components/Base'
8import { PointInput, AddressInput, InnerLabel } from '../components/Base'
9
9
10import StatelessTransaction from '../components/StatelessTransaction'
10import StatelessTransaction from '../components/StatelessTransaction'
11
11
12−import { ROUTE_NAMES } from '../lib/router'
13import { NETWORK_NAMES } from '../lib/network'
12import { NETWORK_NAMES } from '../lib/network'
14import { BRIDGE_ERROR } from '../lib/error'
13import { BRIDGE_ERROR } from '../lib/error'
15import { getSpawnCandidate } from '../lib/child'
14import { getSpawnCandidate } from '../lib/child'
16−import { canDecodePatp, sendSignedTransaction, fromWei } from '../lib/txn'
15+import { canDecodePatp } from '../lib/txn'
17
16
18import {
17import {
19 ETH_ZERO_ADDR,
18 ETH_ZERO_ADDR,
20 isValidAddress,
19 isValidAddress,
21− eqAddr,
20+ eqAddr
22− addressFromSecp256k1Public
23} from '../lib/wallet'
21} from '../lib/wallet'
24
22
25class IssueChild extends React.Component {
23class IssueChild extends React.Component {
src/bridge/views/Point/Actions.js−7
@@ -24,19 +24,12 @@ const Actions = (props) => {
24 }
24 }
25 })
25 })
26
26
27− const canSetTransferProxy = pointDetails.matchWith({
28− // also should check is addr is operator
29− Nothing: _ => false,
30− Just: details => eqAddr(details.value.owner, addr)
31− })
32−
33 const canSetSpawnProxy = pointDetails.matchWith({
27 const canSetSpawnProxy = pointDetails.matchWith({
34 Nothing: _ => false,
28 Nothing: _ => false,
35 Just: details =>
29 Just: details =>
36 eqAddr(details.value.owner, addr) && details.value.active
30 eqAddr(details.value.owner, addr) && details.value.active
37 })
31 })
38
32
39−
40 const canSetManagementProxy = pointDetails.matchWith({
33 const canSetManagementProxy = pointDetails.matchWith({
41 Nothing: _ => false,
34 Nothing: _ => false,
42 Just: details =>
35 Just: details =>
src/bridge/views/SetKeys.js+2−13
@@ -2,25 +2,14 @@ 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 { Row, Col, H1, P, Warning, H3 } from '../components/Base'
5+import { Row, Col, H1, P, Warning } from '../components/Base'
6−import { RequiredInput, InnerLabel } from '../components/Base'
7
6
8import StatelessTransaction from '../components/StatelessTransaction'
7import StatelessTransaction from '../components/StatelessTransaction'
9import { BRIDGE_ERROR } from '../lib/error'
8import { BRIDGE_ERROR } from '../lib/error'
10−import { ROUTE_NAMES } from '../lib/router'
11−import { attemptSeedDerivation, genKey } from '../lib/keys'
9+import { attemptSeedDerivation } from '../lib/keys'
12−
13−import saveAs from 'file-saver'
14−
15−import { WALLET_NAMES } from '../lib/wallet'
16
10
17import * as kg from '../../../node_modules/urbit-key-generation/dist/index'
11import * as kg from '../../../node_modules/urbit-key-generation/dist/index'
18
12
19−import {
20− sendSignedTransaction,
21− fromWei,
22− } from '../lib/txn'
23−
24import {
13import {
25 addressFromSecp256k1Public,
14 addressFromSecp256k1Public,
26 addHexPrefix
15 addHexPrefix
src/bridge/views/SetProxy.js+1−1
@@ -1,7 +1,7 @@
1import Maybe from 'folktale/maybe'
1import Maybe 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 { Row, Col, H1, H3, P, InnerLabel, ShowBlockie, Anchor } from '../components/Base'
4+import { Row, Col, H1, P, InnerLabel, ShowBlockie, Anchor } from '../components/Base'
5import { AddressInput } from '../components/Base'
5import { AddressInput } from '../components/Base'
6import * as ob from 'urbit-ob'
6import * as ob from 'urbit-ob'
7
7
src/bridge/views/Transfer.js+3−10
@@ -4,22 +4,15 @@ import * as azimuth from 'azimuth-js'
4import * as ob from 'urbit-ob'
4import * as ob from 'urbit-ob'
5
5
6import { Row, Col, H1, InnerLabel, ShowBlockie, P, Anchor } from '../components/Base'
6import { Row, Col, H1, InnerLabel, ShowBlockie, P, Anchor } from '../components/Base'
7−import { AddressInput, Warning, H3 } from '../components/Base'
7+import { AddressInput } from '../components/Base'
8import StatelessTransaction from '../components/StatelessTransaction'
8import StatelessTransaction from '../components/StatelessTransaction'
9
9
10import { BRIDGE_ERROR } from '../lib/error'
10import { BRIDGE_ERROR } from '../lib/error'
11import { NETWORK_NAMES } from '../lib/network'
11import { NETWORK_NAMES } from '../lib/network'
12−import { ROUTE_NAMES } from '../lib/router'
13
12
14import {
13import {
15− sendSignedTransaction,
16− fromWei,
17− } from '../lib/txn'
18−
19− import {
20− isValidAddress,
14+ isValidAddress
21− addressFromSecp256k1Public
22− } from '../lib/wallet'
15+} from '../lib/wallet'
23
16
24class Transfer extends React.Component {
17class Transfer extends React.Component {
25 constructor(props) {
18 constructor(props) {