Don't pop-up notifications after network switch (#4076)

* Better notifications

* Don't pollute with notifs if switched networks

* Better connection close/open events / No more notifs on change network

* PR Grumbles

* Add close and open events to HTTP // Add tests

* Fix tests

* WIP Signer Fix

* Fix Signer // Better reconnection handling

* PR Grumbles

* PR Grumbles

* Fixes wrong fetching of balances + Notifications

* Secure API WIP

* Updated Secure API Connection + Status

* Linting

* Linting

* Updated Secure API Logic

* Proper handling of token updates // Fixing poping notifications

* PR Grumbles

* PR Grumbles

* Fixing tests
This commit is contained in:
Nicolas Gotchac
2017-01-12 14:25:32 +01:00
committed by Jaco Greeff
parent bc2ebdc564
commit 81beec1352
22 changed files with 904 additions and 287 deletions

View File

@@ -37,6 +37,14 @@ export default class MiningSettings extends Component {
const { nodeStatus } = this.props;
const { coinbase, defaultExtraData, extraData, gasFloorTarget, minGasPrice } = nodeStatus;
const extradata = extraData
? decodeExtraData(extraData)
: '';
const defaultExtradata = defaultExtraData
? decodeExtraData(defaultExtraData)
: '';
return (
<div { ...this._testInherit() }>
<ContainerTitle title='mining settings' />
@@ -53,9 +61,9 @@ export default class MiningSettings extends Component {
<Input
label='extradata'
hint='extra data for mined blocks'
value={ decodeExtraData(extraData) }
value={ extradata }
onSubmit={ this.onExtraDataChange }
defaultValue={ decodeExtraData(defaultExtraData) }
defaultValue={ defaultExtradata }
allowCopy
floatCopy
{ ...this._test('extra-data') }

View File

@@ -95,9 +95,15 @@ export default class Status extends Component {
renderSettings () {
const { nodeStatus } = this.props;
const { rpcSettings, netPeers } = nodeStatus;
const { rpcSettings, netPeers, netPort = '' } = nodeStatus;
const peers = `${netPeers.active}/${netPeers.connected}/${netPeers.max}`;
if (!rpcSettings) {
return null;
}
const rpcPort = rpcSettings.port || '';
return (
<div { ...this._test('settings') }>
<ContainerTitle title='network settings' />
@@ -121,7 +127,7 @@ export default class Status extends Component {
allowCopy
readOnly
label='network port'
value={ nodeStatus.netPort.toString() }
value={ netPort.toString() }
{ ...this._test('network-port') } />
</div>
</div>
@@ -146,7 +152,7 @@ export default class Status extends Component {
allowCopy
readOnly
label='rpc port'
value={ rpcSettings.port.toString() }
value={ rpcPort.toString() }
{ ...this._test('rpc-port') } />
</div>
</div>