Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Allow editing of gasPrice & gas in Signer #3777

Merged
merged 47 commits into from
Dec 11, 2016
Merged
Show file tree
Hide file tree
Changes from 41 commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
114d751
Rework gas display (maintainable)
jacogr Dec 9, 2016
2465173
Move GasPriceSelector to ui
jacogr Dec 9, 2016
cdcaf59
Allow opening of gas component (WIP)
jacogr Dec 9, 2016
8645f5d
Merge
jacogr Dec 9, 2016
f73483a
Merge branch 'master' into jg-signer-gas
jacogr Dec 9, 2016
88c66b4
Consistency
jacogr Dec 9, 2016
664399e
Adjust for Signer display
jacogr Dec 9, 2016
bbd04a7
Set maximum height based on screen size
jacogr Dec 9, 2016
38704c0
Gas editor displays in-place
jacogr Dec 9, 2016
8d8aa43
Cleanups
jacogr Dec 9, 2016
95488da
Merge branch 'master' into jg-signer-gas
jacogr Dec 9, 2016
945f509
Merge
jacogr Dec 10, 2016
781fd8e
Merge branch 'master' into jg-signer-gas
jacogr Dec 10, 2016
537917f
Style fixes
jacogr Dec 10, 2016
73d8ce2
Fixup stash mishap (again)
jacogr Dec 10, 2016
340fa4a
Add store test
jacogr Dec 10, 2016
0421039
Merge branch 'master' into jg-signer-gas
jacogr Dec 10, 2016
90aa763
Allow edited values to refrect on the display
jacogr Dec 10, 2016
3ac1b30
Merge branch 'master' into jg-signer-gas
jacogr Dec 10, 2016
7d2a304
Fix properties
jacogr Dec 10, 2016
c82de50
Adjust styling to show different rows
jacogr Dec 10, 2016
6de78c6
git mv
jacogr Dec 10, 2016
d135dba
git mv
jacogr Dec 10, 2016
d9b4e33
Style fixes
jacogr Dec 10, 2016
52eb7a4
Style updates
jacogr Dec 10, 2016
5728de3
Pass gas & gasPrice with confirmation
jacogr Dec 10, 2016
5c294f9
Fix build (case)
jacogr Dec 10, 2016
4a11137
Style fixes
jacogr Dec 10, 2016
562fef5
Basic GasPriceEditor smoketest
jacogr Dec 10, 2016
9c16b11
Merge branch 'master' into jg-signer-gas
jacogr Dec 10, 2016
142acfc
manual move 1
jacogr Dec 10, 2016
f09c138
manual move 2
jacogr Dec 10, 2016
3314a83
manual move 1
jacogr Dec 10, 2016
dff2396
manual move 2
jacogr Dec 10, 2016
97ffe26
NODE_ENV=test ace fix
jacogr Dec 10, 2016
7723ef4
UI smoketests
jacogr Dec 10, 2016
bab63c6
Style
jacogr Dec 10, 2016
afbf3a9
Merge branch 'master' into jg-signer-gas
jacogr Dec 10, 2016
5a0315e
Format options via formatter
jacogr Dec 10, 2016
64e8b78
Initial version
jacogr Dec 10, 2016
5ad5517
Re-add even/odd class
jacogr Dec 10, 2016
b768a97
re-add gasLimit to embedded passing
jacogr Dec 11, 2016
a3d912b
style
jacogr Dec 11, 2016
f5c9e28
Updated for passing gas & price to store
jacogr Dec 11, 2016
317bc3e
Merge branch 'master' into jg-signer-gas
jacogr Dec 11, 2016
2488318
Allow gas/price overrides when none available
jacogr Dec 11, 2016
26b5690
Fix slider value, pass as number
jacogr Dec 11, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions js/src/api/rpc/signer/signer.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Parity. If not, see <http://www.gnu.org/licenses/>.

import { inNumber16, inData } from '../../format/input';
import { inData, inNumber16, inOptions } from '../../format/input';
import { outSignerRequest } from '../../format/output';

export default class Signer {
Expand All @@ -24,7 +24,7 @@ export default class Signer {

confirmRequest (requestId, options, password) {
return this._transport
.execute('signer_confirmRequest', inNumber16(requestId), options, password);
.execute('signer_confirmRequest', inNumber16(requestId), inOptions(options), password);
}

confirmRequestRaw (requestId, data) {
Expand Down
6 changes: 3 additions & 3 deletions js/src/redux/providers/signerMiddleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ export default class SignerMiddleware {
}

onConfirmStart = (store, action) => {
const { id, password, wallet, payload } = action.payload;
const { gas, gasPrice, id, password, payload, wallet } = action.payload;

const handlePromise = promise => {
const handlePromise = (promise) => {
promise
.then((txHash) => {
console.log('confirmRequest', id, txHash);
Expand Down Expand Up @@ -102,7 +102,7 @@ export default class SignerMiddleware {
return;
}

handlePromise(this._api.signer.confirmRequest(id, {}, password));
handlePromise(this._api.signer.confirmRequest(id, { gas, gasPrice }, password));
}

onRejectStart = (store, action) => {
Expand Down
6 changes: 6 additions & 0 deletions js/src/ui/Editor/mode-solidity.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@
/* eslint-disable */
var ace = window.ace;

if (process.env.NODE_ENV === 'test') {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

npm run test fix - really not sure why it only pops up now and why the rest of the window.ace object is defined but not define(...)

if (!ace.define) {
ace.define = () => {};
}
}

ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(acequire, exports, module) {
"use strict";

Expand Down
Loading