on master help sign in
- Fix ES6 import warnings
commitcfb613f00587c17f872502186fc4c826bcb8eef4 authorChris Johnson <chris@cjohnson.io> dateThu 4 Apr 2019, 17:00 (8 years ago) parent953b857
11 files changed+17−69
src/Root.js−1 src/bridge/components/StatelessTransaction.js+3−4 src/bridge/views/AcceptTransfer.js+2−4 src/bridge/views/CancelTransfer.js+1−12 src/bridge/views/CreateGalaxy.js+1−9 src/bridge/views/GenKeyfile.js+1−3 src/bridge/views/IssueChild.js+3−5 src/bridge/views/Point/Actions.js−7 src/bridge/views/SetKeys.js+2−13 src/bridge/views/SetProxy.js+1−1 src/bridge/views/Transfer.js+3−10
src/Root.js−1
@@ -1,7 +1,6 @@
11import 'babel-polyfill' // required for @ledgerhq/hw-transport-u2f
22
33import React from 'react'
4−import ReactDOM from 'react-dom'
54import _ from 'lodash'
65
76import 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'
22import React from 'react'
33
44import { Code, H3 } from './Base'
@@ -190,9 +190,8 @@ class StatelessTransaction extends React.Component {
190190 const { gasPrice, gasLimit, nonce, chainId,
191191 txn, stx, userApproval, showGasDetails } = this.state
192192
193− const { setNonce, setChainId, setGasLimit, setGasPrice,
194− submit, toggleGasDetails, setUserApproval,
195− sendTxn, createUnsignedTxn } = this
193+ const { setNonce, setChainId, setGasLimit, setGasPrice, toggleGasDetails,
194+ setUserApproval, sendTxn, createUnsignedTxn } = this
196195
197196 const { state } = this
198197
src/bridge/views/AcceptTransfer.js+2−4
@@ -1,6 +1,6 @@
1−import { Just, Nothing } from 'folktale/maybe'
1+import { Just } from 'folktale/maybe'
22import React from 'react'
3−import { Row, Col, H1, H3, P, Warning } from '../components/Base'
3+import { Row, Col, H1, P } from '../components/Base'
44import { InnerLabel, AddressInput, ShowBlockie, Anchor } from '../components/Base'
55import * as azimuth from 'azimuth-js'
66import * as ob from 'urbit-ob'
@@ -8,8 +8,6 @@ import * as ob from 'urbit-ob'
88import StatelessTransaction from '../components/StatelessTransaction'
99import { BRIDGE_ERROR } from '../lib/error'
1010import { NETWORK_NAMES } from '../lib/network'
11−import { ROUTE_NAMES } from '../lib/router'
12−import { sendSignedTransaction, fromWei } from '../lib/txn'
1311import { isValidAddress, addressFromSecp256k1Public } from '../lib/wallet'
1412
1513class AcceptTransfer extends React.Component {
src/bridge/views/CancelTransfer.js+1−12
@@ -1,23 +1,12 @@
11import Maybe from 'folktale/maybe'
22import React from 'react'
3−import { Row, Col, H1, P, Warning, H3 } from '../components/Base'
3+import { Row, Col, H1, P } from '../components/Base'
44import * as azimuth from 'azimuth-js'
55import * as ob from 'urbit-ob'
66
77import StatelessTransaction from '../components/StatelessTransaction'
88import { BRIDGE_ERROR } from '../lib/error'
99import { 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−
2110
2211class CancelTransfer extends React.Component {
2312 constructor(props) {
src/bridge/views/CreateGalaxy.js+1−9
@@ -9,16 +9,8 @@ import { InnerLabel, GalaxyInput, AddressInput, ValidatedSigil, ShowBlockie } fr
99import StatelessTransaction from '../components/StatelessTransaction'
1010
1111import { BRIDGE_ERROR } from '../lib/error'
12−
1312import { NETWORK_NAMES } from '../lib/network'
14−
15−import {
16− sendSignedTransaction,
17− getTxnInfo,
18− canDecodePatp
19−} from '../lib/txn'
20−
21−import { ROUTE_NAMES } from '../lib/router'
13+import { canDecodePatp } from '../lib/txn'
2214
2315import {
2416 addressFromSecp256k1Public,
src/bridge/views/GenKeyfile.js+1−3
@@ -2,9 +2,7 @@ import React from 'react'
22import Maybe from 'folktale/maybe'
33
44import { Button } from '../components/Base'
5−import { RequiredInput, InnerLabel } from '../components/Base'
65import { Row, Col, H1, P } from '../components/Base'
7−import { Code } from '../components/Base'
86
97import * as ob from 'urbit-ob'
108import * as kg from '../../../node_modules/urbit-key-generation/dist/index'
@@ -96,7 +94,7 @@ class GenKeyfile extends React.Component {
9694 }
9795
9896 render() {
99− const { point, pointDetails, revision } = this.getPointDetails();
97+ const { point, revision } = this.getPointDetails();
10098 const { keyfile, loaded } = this.state
10199
102100 return (
src/bridge/views/IssueChild.js+3−5
@@ -3,23 +3,21 @@ import React from 'react'
33import { azimuth, ecliptic } from 'azimuth-js'
44import * as ob from 'urbit-ob'
55
6−import { Row, Col, H1, H3, P, Anchor, Warning } from '../components/Base'
6+import { Row, Col, H1, P, Anchor } from '../components/Base'
77import { Button, ShowBlockie, ValidatedSigil } from '../components/Base'
88import { PointInput, AddressInput, InnerLabel } from '../components/Base'
99
1010import StatelessTransaction from '../components/StatelessTransaction'
1111
12−import { ROUTE_NAMES } from '../lib/router'
1312import { NETWORK_NAMES } from '../lib/network'
1413import { BRIDGE_ERROR } from '../lib/error'
1514import { getSpawnCandidate } from '../lib/child'
16−import { canDecodePatp, sendSignedTransaction, fromWei } from '../lib/txn'
15+import { canDecodePatp } from '../lib/txn'
1716
1817import {
1918 ETH_ZERO_ADDR,
2019 isValidAddress,
21− eqAddr,
22− addressFromSecp256k1Public
20+ eqAddr
2321} from '../lib/wallet'
2422
2523class IssueChild extends React.Component {
src/bridge/views/Point/Actions.js−7
@@ -24,19 +24,12 @@ const Actions = (props) => {
2424 }
2525 })
2626
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−
3327 const canSetSpawnProxy = pointDetails.matchWith({
3428 Nothing: _ => false,
3529 Just: details =>
3630 eqAddr(details.value.owner, addr) && details.value.active
3731 })
3832
39−
4033 const canSetManagementProxy = pointDetails.matchWith({
4134 Nothing: _ => false,
4235 Just: details =>
src/bridge/views/SetKeys.js+2−13
@@ -2,25 +2,14 @@ import React from 'react'
22import Maybe from 'folktale/maybe'
33import * as azimuth from 'azimuth-js'
44import * as ob from 'urbit-ob'
5−import { Row, Col, H1, P, Warning, H3 } from '../components/Base'
6−import { RequiredInput, InnerLabel } from '../components/Base'
5+import { Row, Col, H1, P, Warning } from '../components/Base'
76
87import StatelessTransaction from '../components/StatelessTransaction'
98import { BRIDGE_ERROR } from '../lib/error'
10−import { ROUTE_NAMES } from '../lib/router'
11−import { attemptSeedDerivation, genKey } from '../lib/keys'
12−
13−import saveAs from 'file-saver'
14−
15−import { WALLET_NAMES } from '../lib/wallet'
9+import { attemptSeedDerivation } from '../lib/keys'
1610
1711import * as kg from '../../../node_modules/urbit-key-generation/dist/index'
1812
19−import {
20− sendSignedTransaction,
21− fromWei,
22− } from '../lib/txn'
23−
2413import {
2514 addressFromSecp256k1Public,
2615 addHexPrefix
src/bridge/views/SetProxy.js+1−1
@@ -1,7 +1,7 @@
11import Maybe from 'folktale/maybe'
22import React from 'react'
33import * 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'
55import { AddressInput } from '../components/Base'
66import * as ob from 'urbit-ob'
77
src/bridge/views/Transfer.js+3−10
@@ -4,22 +4,15 @@ import * as azimuth from 'azimuth-js'
44import * as ob from 'urbit-ob'
55
66import { Row, Col, H1, InnerLabel, ShowBlockie, P, Anchor } from '../components/Base'
7−import { AddressInput, Warning, H3 } from '../components/Base'
7+import { AddressInput } from '../components/Base'
88import StatelessTransaction from '../components/StatelessTransaction'
99
1010import { BRIDGE_ERROR } from '../lib/error'
1111import { NETWORK_NAMES } from '../lib/network'
12−import { ROUTE_NAMES } from '../lib/router'
1312
1413import {
15− sendSignedTransaction,
16− fromWei,
17− } from '../lib/txn'
18−
19− import {
20− isValidAddress,
21− addressFromSecp256k1Public
22− } from '../lib/wallet'
14+ isValidAddress
15+} from '../lib/wallet'
2316
2417class Transfer extends React.Component {
2518 constructor(props) {