From 1879dbca8aa1c71a2335abaf685954a92d13306f Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Wed, 22 Mar 2017 16:39:40 +0100 Subject: [PATCH] Consistent store naming in the Signer components (#4996) --- .../components/RequestPending/requestPending.js | 8 ++++---- .../Signer/components/SignRequest/signRequest.js | 10 +++++----- .../components/SignRequest/signRequest.spec.js | 2 +- .../TransactionPending/transactionPending.js | 14 +++++++------- .../views/Signer/containers/Embedded/embedded.js | 2 +- .../Signer/containers/RequestsPage/requestsPage.js | 2 +- 6 files changed, 19 insertions(+), 19 deletions(-) diff --git a/js/src/views/Signer/components/RequestPending/requestPending.js b/js/src/views/Signer/components/RequestPending/requestPending.js index 671df6cbb..3d8ea0c15 100644 --- a/js/src/views/Signer/components/RequestPending/requestPending.js +++ b/js/src/views/Signer/components/RequestPending/requestPending.js @@ -36,7 +36,7 @@ export default class RequestPending extends Component { PropTypes.shape({ sign: PropTypes.object.isRequired }), PropTypes.shape({ signTransaction: PropTypes.object.isRequired }) ]).isRequired, - signerstore: PropTypes.object.isRequired + signerStore: PropTypes.object.isRequired }; static defaultProps = { @@ -45,7 +45,7 @@ export default class RequestPending extends Component { }; render () { - const { className, date, focus, gasLimit, id, isSending, netVersion, onReject, payload, signerstore, origin } = this.props; + const { className, date, focus, gasLimit, id, isSending, netVersion, onReject, payload, signerStore, origin } = this.props; if (payload.sign) { const { sign } = payload; @@ -63,7 +63,7 @@ export default class RequestPending extends Component { onConfirm={ this.onConfirm } onReject={ onReject } origin={ origin } - signerstore={ signerstore } + signerStore={ signerStore } /> ); } @@ -83,7 +83,7 @@ export default class RequestPending extends Component { onConfirm={ this.onConfirm } onReject={ onReject } origin={ origin } - signerstore={ signerstore } + signerStore={ signerStore } transaction={ transaction } /> ); diff --git a/js/src/views/Signer/components/SignRequest/signRequest.js b/js/src/views/Signer/components/SignRequest/signRequest.js index 373262d41..8c9984b4b 100644 --- a/js/src/views/Signer/components/SignRequest/signRequest.js +++ b/js/src/views/Signer/components/SignRequest/signRequest.js @@ -47,7 +47,7 @@ export default class SignRequest extends Component { id: PropTypes.object.isRequired, isFinished: PropTypes.bool.isRequired, netVersion: PropTypes.string.isRequired, - signerstore: PropTypes.object.isRequired, + signerStore: PropTypes.object.isRequired, className: PropTypes.string, focus: PropTypes.bool, @@ -67,9 +67,9 @@ export default class SignRequest extends Component { }; componentWillMount () { - const { address, signerstore } = this.props; + const { address, signerStore } = this.props; - signerstore.fetchBalance(address); + signerStore.fetchBalance(address); } render () { @@ -106,8 +106,8 @@ export default class SignRequest extends Component { renderDetails () { const { api } = this.context; - const { address, data, netVersion, origin, signerstore } = this.props; - const { balances, externalLink } = signerstore; + const { address, data, netVersion, origin, signerStore } = this.props; + const { balances, externalLink } = signerStore; const balance = balances[address]; diff --git a/js/src/views/Signer/components/SignRequest/signRequest.spec.js b/js/src/views/Signer/components/SignRequest/signRequest.spec.js index cf7d7e9f6..c5c87d509 100644 --- a/js/src/views/Signer/components/SignRequest/signRequest.spec.js +++ b/js/src/views/Signer/components/SignRequest/signRequest.spec.js @@ -28,7 +28,7 @@ const store = { describe('views/Signer/components/SignRequest', () => { it('renders', () => { expect(shallow( - , + , )).to.be.ok; }); }); diff --git a/js/src/views/Signer/components/TransactionPending/transactionPending.js b/js/src/views/Signer/components/TransactionPending/transactionPending.js index 9b0b91ef6..90ea75b22 100644 --- a/js/src/views/Signer/components/TransactionPending/transactionPending.js +++ b/js/src/views/Signer/components/TransactionPending/transactionPending.js @@ -48,7 +48,7 @@ class TransactionPending extends Component { onConfirm: PropTypes.func.isRequired, onReject: PropTypes.func.isRequired, origin: PropTypes.any, - signerstore: PropTypes.object.isRequired, + signerStore: PropTypes.object.isRequired, transaction: PropTypes.shape({ condition: PropTypes.object, data: PropTypes.string, @@ -75,10 +75,10 @@ class TransactionPending extends Component { gasPrice: this.props.transaction.gasPrice.toFixed() }); - hwstore = HardwareStore.get(this.context.api); + hardwareStore = HardwareStore.get(this.context.api); componentWillMount () { - const { signerstore, transaction } = this.props; + const { signerStore, transaction } = this.props; const { from, gas, gasPrice, to, value } = transaction; const fee = tUtil.getFee(gas, gasPrice); // BigNumber object @@ -88,7 +88,7 @@ class TransactionPending extends Component { this.setState({ gasPriceEthmDisplay, totalValue, gasToDisplay }); this.gasStore.setEthValue(value); - signerstore.fetchBalances([from, to]); + signerStore.fetchBalances([from, to]); } render () { @@ -98,13 +98,13 @@ class TransactionPending extends Component { } renderTransaction () { - const { accounts, className, focus, id, isSending, netVersion, origin, signerstore, transaction } = this.props; + const { accounts, className, focus, id, isSending, netVersion, origin, signerStore, transaction } = this.props; const { totalValue } = this.state; - const { balances, externalLink } = signerstore; + const { balances, externalLink } = signerStore; const { from, value } = transaction; const fromBalance = balances[from]; const account = accounts[from] || {}; - const disabled = account.hardware && !this.hwstore.isConnected(from); + const disabled = account.hardware && !this.hardwareStore.isConnected(from); return (
diff --git a/js/src/views/Signer/containers/Embedded/embedded.js b/js/src/views/Signer/containers/Embedded/embedded.js index adac35621..b79b4f203 100644 --- a/js/src/views/Signer/containers/Embedded/embedded.js +++ b/js/src/views/Signer/containers/Embedded/embedded.js @@ -101,7 +101,7 @@ class Embedded extends Component { onReject={ actions.startRejectRequest } origin={ origin } payload={ payload } - signerstore={ this.store } + signerStore={ this.store } /> ); } diff --git a/js/src/views/Signer/containers/RequestsPage/requestsPage.js b/js/src/views/Signer/containers/RequestsPage/requestsPage.js index c0cddb8d0..8af2e5fd5 100644 --- a/js/src/views/Signer/containers/RequestsPage/requestsPage.js +++ b/js/src/views/Signer/containers/RequestsPage/requestsPage.js @@ -141,7 +141,7 @@ class RequestsPage extends Component { onReject={ actions.startRejectRequest } origin={ origin } payload={ payload } - signerstore={ this.store } + signerStore={ this.store } /> ); }