Fixing JS lints
This commit is contained in:
parent
5c62e38a7c
commit
be6eb79296
@ -135,7 +135,9 @@ export default class Parity {
|
||||
.then(transactions => {
|
||||
Object.values(transactions)
|
||||
.filter(tx => tx.transaction)
|
||||
.map(tx => tx.transaction = outTransaction(tx.transaction));
|
||||
.map(tx => {
|
||||
tx.transaction = outTransaction(tx.transaction);
|
||||
});
|
||||
return transactions;
|
||||
});
|
||||
}
|
||||
|
@ -137,13 +137,11 @@ export class Transaction extends BaseTransaction {
|
||||
|
||||
render () {
|
||||
const { isLocal, stats, transaction, idx } = this.props;
|
||||
const blockNo = new BigNumber(stats.firstSeen);
|
||||
|
||||
const clazz = classnames(styles.transaction, {
|
||||
[styles.local]: isLocal
|
||||
});
|
||||
const noOfPeers = Object.keys(stats.propagatedTo).length;
|
||||
const noOfPropagations = Object.values(stats.propagatedTo).reduce((sum, val) => sum + val, 0);
|
||||
const blockNo = new BigNumber(stats.firstSeen);
|
||||
|
||||
return (
|
||||
<tr className={ clazz }>
|
||||
@ -232,7 +230,7 @@ export class LocalTransaction extends BaseTransaction {
|
||||
const { isResubmitting, gasPrice } = this.state;
|
||||
|
||||
this.setState({
|
||||
isResubmitting: !isResubmitting,
|
||||
isResubmitting: !isResubmitting
|
||||
});
|
||||
|
||||
if (gasPrice === null) {
|
||||
@ -243,6 +241,18 @@ export class LocalTransaction extends BaseTransaction {
|
||||
}
|
||||
};
|
||||
|
||||
setGasPrice = el => {
|
||||
this.setState({
|
||||
gasPrice: el.target.value
|
||||
});
|
||||
};
|
||||
|
||||
setGas = el => {
|
||||
this.setState({
|
||||
gas: el.target.value
|
||||
});
|
||||
};
|
||||
|
||||
sendTransaction = () => {
|
||||
const { transaction } = this.props;
|
||||
const { gasPrice, gas } = this.state;
|
||||
@ -317,18 +327,20 @@ export class LocalTransaction extends BaseTransaction {
|
||||
const { details } = this.props;
|
||||
|
||||
let state = {
|
||||
'pending': () => `In queue: Pending`,
|
||||
'future': () => `In queue: Future`,
|
||||
'mined': () => `Mined`,
|
||||
'dropped': () => `Dropped because of queue limit`,
|
||||
'invalid': () => `Transaction is invalid`,
|
||||
'pending': () => 'In queue: Pending',
|
||||
'future': () => 'In queue: Future',
|
||||
'mined': () => 'Mined',
|
||||
'dropped': () => 'Dropped because of queue limit',
|
||||
'invalid': () => 'Transaction is invalid',
|
||||
'rejected': () => `Rejected: ${details.error}`,
|
||||
'replaced': () => `Replaced by ${ this.shortHash(details.hash) }`,
|
||||
'replaced': () => `Replaced by ${this.shortHash(details.hash)}`
|
||||
}[this.props.status];
|
||||
|
||||
return state ? state() : 'unknown';
|
||||
}
|
||||
|
||||
// TODO [ToDr] Gas Price / Gas selection is not needed
|
||||
// when signer supports gasPrice/gas tunning.
|
||||
renderResubmit () {
|
||||
const { transaction } = this.props;
|
||||
const { gasPrice, gas } = this.state;
|
||||
@ -350,12 +362,12 @@ export class LocalTransaction extends BaseTransaction {
|
||||
<input
|
||||
type='text'
|
||||
value={ gasPrice }
|
||||
onChange={ el => this.setState({ gasPrice: el.target.value }) }
|
||||
onChange={ this.setGasPrice }
|
||||
/>
|
||||
<input
|
||||
type='text'
|
||||
value={ gas }
|
||||
onChange={ el => this.setState({ gas: el.target.value }) }
|
||||
onChange={ this.setGas }
|
||||
/>
|
||||
</td>
|
||||
<td colSpan='2'>
|
||||
|
Loading…
Reference in New Issue
Block a user