Allow editing of gasPrice & gas in Signer (#3777)

* Rework gas display (maintainable)

* Move GasPriceSelector to ui

* Allow opening of gas component (WIP)

* Merge

* Consistency

* Adjust for Signer display

* Set maximum height based on screen size

* Gas editor displays in-place

* Cleanups

* Merge

* Style fixes

* Fixup stash mishap (again)

* Add store test

* Allow edited values to refrect on the display

* Fix properties

* Adjust styling to show different rows

* git mv

* git mv

* Style fixes

* Style updates

* Pass gas & gasPrice with confirmation

* Fix build (case)

* Style fixes

* Basic GasPriceEditor smoketest

* manual move 1

* manual move 2

* manual move 1

* manual move 2

* NODE_ENV=test ace fix

* UI smoketests

* Style

* Format options via formatter

* Initial version

* Re-add even/odd class

* re-add gasLimit to embedded passing

* style

* Updated for passing gas & price to store

* Allow gas/price overrides when none available

* Fix slider value, pass as number
This commit is contained in:
Jaco Greeff
2016-12-11 17:43:51 +01:00
committed by GitHub
parent 885d6eaa4d
commit 929b6ee0f7
59 changed files with 1423 additions and 856 deletions

View File

@@ -21,21 +21,26 @@ import SignRequest from '../SignRequest';
export default class RequestPending extends Component {
static propTypes = {
className: PropTypes.string,
date: PropTypes.instanceOf(Date).isRequired,
gasLimit: PropTypes.object.isRequired,
id: PropTypes.object.isRequired,
isSending: PropTypes.bool.isRequired,
isTest: PropTypes.bool.isRequired,
onConfirm: PropTypes.func.isRequired,
onReject: PropTypes.func.isRequired,
isSending: PropTypes.bool.isRequired,
date: PropTypes.instanceOf(Date).isRequired,
payload: PropTypes.oneOfType([
PropTypes.shape({ signTransaction: PropTypes.object.isRequired }),
PropTypes.shape({ sendTransaction: PropTypes.object.isRequired }),
PropTypes.shape({ sign: PropTypes.object.isRequired })
PropTypes.shape({ sign: PropTypes.object.isRequired }),
PropTypes.shape({ signTransaction: PropTypes.object.isRequired })
]).isRequired,
className: PropTypes.string,
isTest: PropTypes.bool.isRequired,
store: PropTypes.object.isRequired
};
static defaultProps = {
isSending: false
};
onConfirm = data => {
const { onConfirm, payload } = this.props;
@@ -44,24 +49,23 @@ export default class RequestPending extends Component {
};
render () {
const { payload, id, className, isSending, date, onReject, isTest, store } = this.props;
const { className, date, gasLimit, id, isSending, isTest, onReject, payload, store } = this.props;
if (payload.sign) {
const { sign } = payload;
return (
<SignRequest
address={ sign.address }
className={ className }
hash={ sign.hash }
id={ id }
isFinished={ false }
isSending={ isSending }
isTest={ isTest }
onConfirm={ this.onConfirm }
onReject={ onReject }
isSending={ isSending }
isFinished={ false }
id={ id }
address={ sign.address }
hash={ sign.hash }
isTest={ isTest }
store={ store }
/>
store={ store } />
);
}
@@ -70,19 +74,19 @@ export default class RequestPending extends Component {
return (
<TransactionPending
className={ className }
date={ date }
gasLimit={ gasLimit }
id={ id }
isSending={ isSending }
isTest={ isTest }
onConfirm={ this.onConfirm }
onReject={ onReject }
isSending={ isSending }
id={ id }
transaction={ transaction }
date={ date }
isTest={ isTest }
store={ store }
/>
transaction={ transaction } />
);
}
// Unknown payload
console.error('RequestPending: Unknown payload', payload);
return null;
}
}