Fixes signer errors throwing // MaterialUI Update errors too (#2867) (#2876)

This commit is contained in:
Nicolas Gotchac 2016-10-26 11:56:38 +02:00 committed by Jaco Greeff
parent 3cd724d056
commit c05430e25e
8 changed files with 34 additions and 20 deletions

View File

@ -93,6 +93,12 @@ export default class Ws extends JsonRpcBase {
} }
_onMessage = (event) => { _onMessage = (event) => {
// Event sent by Signer Broadcaster
if (event.data === 'new_message') {
return false;
}
try {
const result = JSON.parse(event.data); const result = JSON.parse(event.data);
const { method, params, json, resolve, reject } = this._messages[result.id]; const { method, params, json, resolve, reject } = this._messages[result.id];
@ -108,6 +114,9 @@ export default class Ws extends JsonRpcBase {
resolve(result.result); resolve(result.result);
delete this._messages[result.id]; delete this._messages[result.id];
} catch (e) {
console.error('ws::_onMessage', event.data, e);
}
} }
_send = (id) => { _send = (id) => {

View File

@ -24,7 +24,7 @@ export default class Loading extends Component {
render () { render () {
return ( return (
<div className={ styles.loading }> <div className={ styles.loading }>
<CircularProgress size={ 2 } /> <CircularProgress size={ 120 } thickness={ 7 } />
</div> </div>
); );
} }

View File

@ -79,7 +79,7 @@ export default class Application extends Component {
</p> </p>
</div> </div>
) : ( ) : (
<CircularProgress size={ 1 } /> <CircularProgress size={ 60 } />
) } ) }
</div> </div>
); );

View File

@ -25,9 +25,11 @@ export default class Loading extends Component {
}; };
render () { render () {
const size = (this.props.size || 2) * 60;
return ( return (
<div className={ styles.loading }> <div className={ styles.loading }>
<CircularProgress size={ this.props.size || 2 } /> <CircularProgress size={ size } />
</div> </div>
); );
} }

View File

@ -15,15 +15,17 @@
/* along with Parity. If not, see <http://www.gnu.org/licenses/>. /* along with Parity. If not, see <http://www.gnu.org/licenses/>.
*/ */
.container { .container {
flex: 1;
padding: 0em; padding: 0em;
background: rgba(0, 0, 0, 0.8) !important;
} }
.compact, .compact,
.padded { .padded {
background: rgba(0, 0, 0, 0.8) !important;
border-radius: 0 !important; border-radius: 0 !important;
position: relative; position: relative;
overflow: auto; overflow: auto;
background-color: transparent !important;
} }
.compact { .compact {

View File

@ -43,7 +43,7 @@
.expanded { .expanded {
right: 16px; right: 16px;
width: 964px; width: 964px;
height: 288px; height: 300px;
border-radius: 4px 4px 0 0; border-radius: 4px 4px 0 0;
overflow-y: auto; overflow-y: auto;
display: flex; display: flex;
@ -53,6 +53,7 @@
.expanded .content { .expanded .content {
flex: 1; flex: 1;
overflow: auto; overflow: auto;
display: flex;
} }
.corner { .corner {

View File

@ -80,7 +80,7 @@ export default class TransactionFinished extends Component {
if (!chain || !fromBalance || !toBalance) { if (!chain || !fromBalance || !toBalance) {
return ( return (
<div className={ `${styles.container} ${className}` }> <div className={ `${styles.container} ${className}` }>
<CircularProgress size={ 1 } /> <CircularProgress size={ 60 } />
</div> </div>
); );
} }

View File

@ -81,7 +81,7 @@ export default class TransactionPending extends Component {
if (!this.state.chain) { if (!this.state.chain) {
return ( return (
<div className={ `${styles.container} ${className}` }> <div className={ `${styles.container} ${className}` }>
<CircularProgress size={ 1 } /> <CircularProgress size={ 60 } />
</div> </div>
); );
} }