Skip to content

Commit

Permalink
Upgrade to react16
Browse files Browse the repository at this point in the history
  • Loading branch information
evgenyboxer committed Nov 16, 2017
1 parent 2c7c83f commit 224f197
Show file tree
Hide file tree
Showing 11 changed files with 223 additions and 235 deletions.
4 changes: 3 additions & 1 deletion __tests__/setupTests.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// @flow
import 'raf/polyfill'
import { configure } from 'enzyme'
import Adapter from 'enzyme-adapter-react-15'
import Adapter from 'enzyme-adapter-react-16'

configure({ adapter: new Adapter() })
2 changes: 1 addition & 1 deletion app/containers/CreateWallet/CreateWallet.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export default class CreateWallet extends Component<Props, State> {
value={passphrase2}
onChange={(e) => this.setState({ passphrase2: e.target.value })}
/>
<button disabled={disabledButton} className={disabledButton && 'disabled'} onClick={this.generateNewWallet}> Generate keys </button>
<button disabled={disabledButton} className={disabledButton ? 'disabled' : ''} onClick={this.generateNewWallet}> Generate keys </button>
<HomeButtonLink />
</div>
)
Expand Down
2 changes: 1 addition & 1 deletion app/containers/EncryptKey/EncryptKey.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export default class EncryptKey extends Component<Props, State> {
onChange={(e) => this.setState({ wif: e.target.value })}
placeholder='Enter existing WIF here'
/>
<button disabled={disabledButton} className={disabledButton && 'disabled'} onClick={this.generateWalletFromWif}> Generate encrypted key </button>
<button disabled={disabledButton} className={disabledButton ? 'disabled' : ''} onClick={this.generateWalletFromWif}> Generate encrypted key </button>
<HomeButtonLink />
</div>
)
Expand Down
2 changes: 1 addition & 1 deletion app/containers/LoginLedgerNanoS/LoginLedgerNanoS.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export default class LoginLedgerNanoS extends Component<Props> {
<div className={loginStyles.title}>Login using the Ledger Nano S:</div>
<div className={loginStyles.loginForm}>
<div>
<button className={!publicKey && 'disabled'} onClick={this.onLedgerNanoSChange}>Use Ledger Nano S</button>
<button className={!publicKey ? 'disabled' : ''} onClick={this.onLedgerNanoSChange}>Use Ledger Nano S</button>
<HomeButtonLink />
</div>
<p>{hardwareDeviceInfo}</p>
Expand Down
2 changes: 1 addition & 1 deletion app/containers/LoginLocalStorage/LoginLocalStorage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export default class LoginLocalStorage extends Component<Props, State> {
</div>
<div>
<button
className={loginButtonDisabled && 'disabled'}
className={loginButtonDisabled ? 'disabled' : ''}
onClick={() => loginNep2(passphrase, wif, history)}
disabled={loginButtonDisabled}>Login</button>
<HomeButtonLink />
Expand Down
2 changes: 1 addition & 1 deletion app/containers/LoginPrivateKey/LoginPrivateKey.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export default class LoginPrivateKey extends Component<Props, State> {
<button
onClick={() => loginWithPrivateKey(wif, history)}
disabled={loginButtonDisabled}
className={loginButtonDisabled && 'disabled'}>Login</button>
className={loginButtonDisabled ? 'disabled' : ''}>Login</button>
<HomeButtonLink />
</div>
</Page>
Expand Down
2 changes: 1 addition & 1 deletion app/containers/LoginTokenSale/LoginTokenSale.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export default class LoginTokenSale extends Component<Props, State> {
<button
onClick={() => loginWithPrivateKey(wif, history, ROUTES.TOKEN_SALE)}
disabled={loginButtonDisabled}
className={loginButtonDisabled && 'disabled'}>Login</button>
className={loginButtonDisabled ? 'disabled' : ''}>Login</button>
<HomeButtonLink />
</div>
</Page>
Expand Down
4 changes: 2 additions & 2 deletions app/containers/TokenSale/TokenSale.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,11 @@ export default class TokenSale extends Component<Props, State> {
/>
</div>
<button
className={submitSaleButtonDisabled && 'disabled'}
className={submitSaleButtonDisabled ? 'disabled' : ''}
onClick={this.participateInSale}
disabled={submitSaleButtonDisabled}>Submit for Sale</button>
<button
className={refreshTokenBalanceButtonDisabled && 'disabled'}
className={refreshTokenBalanceButtonDisabled ? 'disabled' : ''}
onClick={() => refreshTokenBalance(scriptHash)}
disabled={refreshTokenBalanceButtonDisabled}>Refresh Token Balance</button>
</div>
Expand Down
1 change: 1 addition & 0 deletions app/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import 'raf/polyfill'
import React from 'react'
import { render } from 'react-dom'
import { AppContainer } from 'react-hot-loader'
Expand Down
11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,18 +84,19 @@
"neon-js": "git+https://github.com/CityOfZion/neon-js.git#02bdca256b5a112ab6d657401be5951ecf9e54f5",
"node-hid": "0.5.7",
"qrcode": "0.9.0",
"react": "15.6.2",
"raf": "3.4.0",
"react": "16.1.1",
"react-addons-test-utils": "15.6.2",
"react-data-grid": "2.0.73",
"react-dom": "15.6.2",
"react-dom": "16.1.1",
"react-hot-loader": "3.1.1",
"react-icons": "2.2.7",
"react-modal": "^3.1.2",
"react-modal": "3.1.2",
"react-redux": "5.0.6",
"react-router-dom": "4.2.2",
"react-split-pane": "0.1.68",
"react-syntax-highlighter": "5.8.0",
"react-test-renderer": "15.6.1",
"react-test-renderer": "16.1.1",
"react-tooltip": "3.4.0",
"redux": "3.7.2",
"redux-logger": "3.0.6",
Expand Down Expand Up @@ -126,7 +127,7 @@
"electron-packager": "9.1.0",
"electron-rebuild": "1.6.0",
"enzyme": "3.1.1",
"enzyme-adapter-react-15": "1.0.5",
"enzyme-adapter-react-16": "1.1.0",
"enzyme-to-json": "3.2.1",
"eslint": "4.10.0",
"eslint-config-standard": "10.2.1",
Expand Down
Loading

0 comments on commit 224f197

Please sign in to comment.