on master help sign in
- show gas price in eth, not gwei
ed9c990Chris Johnson
src/components/StatelessTransaction.js+1−1
@@ -65,7 +65,7 @@ const StatelessTransaction = props => {
65
65
66 const gasPriceRangeDialogue = (
66 const gasPriceRangeDialogue = (
67 <React.Fragment>
67 <React.Fragment>
68− <div className="mt-8">Gas Price: <span className="ml-4 text-700 text-sm">{gasPrice} gwei</span></div>
68+ <div className="mt-8">Gas Price: <span className="ml-4 text-700 text-sm">{(gasPrice / 1000000000).toFixed('9')} eth</span></div>
69
69
70 <input
70 <input
71 className="mt-4"
71 className="mt-4"
src/views/AcceptTransfer.js+10
@@ -38,6 +38,7 @@ class AcceptTransfer extends React.Component {
38 userApproval: false,
38 userApproval: false,
39 nonce: '',
39 nonce: '',
40 gasPrice: '5',
40 gasPrice: '5',
41+ showGasDetails: false,
41 chainId: '',
42 chainId: '',
42 gasLimit: '600000',
43 gasLimit: '600000',
43 stx: Nothing(),
44 stx: Nothing(),
@@ -53,6 +54,13 @@ class AcceptTransfer extends React.Component {
53 this.handleSetChainId = this.handleSetChainId.bind(this)
54 this.handleSetChainId = this.handleSetChainId.bind(this)
54 this.handleSetGasPrice = this.handleSetGasPrice.bind(this)
55 this.handleSetGasPrice = this.handleSetGasPrice.bind(this)
55 this.handleSetGasLimit = this.handleSetGasLimit.bind(this)
56 this.handleSetGasLimit = this.handleSetGasLimit.bind(this)
57+ this.toggleGasDetails = this.toggleGasDetails.bind(this)
58+ }
59+
60+ toggleGasDetails() {
61+ this.setState({
62+ showGasDetails: !this.state.showGasDetails
63+ })
56 }
64 }
57
65
58 componentDidMount() {
66 componentDidMount() {
@@ -260,6 +268,8 @@ class AcceptTransfer extends React.Component {
260 gasPrice={state.gasPrice}
268 gasPrice={state.gasPrice}
261 chainId={state.chainId}
269 chainId={state.chainId}
262 gasLimit={state.gasLimit}
270 gasLimit={state.gasLimit}
271+ showGasDetails={state.showGasDetails}
272+ toggleGasDetails={state.toggleGasDetails}
263 // Checks
273 // Checks
264 userApproval={state.userApproval}
274 userApproval={state.userApproval}
265 canGenerate={ canGenerate }
275 canGenerate={ canGenerate }
src/views/CancelTransfer.js+10
@@ -38,6 +38,7 @@ class CancelTransfer extends React.Component {
38 userApproval: false,
38 userApproval: false,
39 nonce: '',
39 nonce: '',
40 gasPrice: '5',
40 gasPrice: '5',
41+ showGasDetails: false,
41 chainId: '',
42 chainId: '',
42 gasLimit: '600000',
43 gasLimit: '600000',
43 stx: Maybe.Nothing(),
44 stx: Maybe.Nothing(),
@@ -52,6 +53,13 @@ class CancelTransfer extends React.Component {
52 this.handleSetChainId = this.handleSetChainId.bind(this)
53 this.handleSetChainId = this.handleSetChainId.bind(this)
53 this.handleSetGasPrice = this.handleSetGasPrice.bind(this)
54 this.handleSetGasPrice = this.handleSetGasPrice.bind(this)
54 this.handleSetGasLimit = this.handleSetGasLimit.bind(this)
55 this.handleSetGasLimit = this.handleSetGasLimit.bind(this)
56+ this.toggleGasDetails = this.toggleGasDetails.bind(this)
57+ }
58+
59+ toggleGasDetails() {
60+ this.setState({
61+ showGasDetails: !this.state.showGasDetails
62+ })
55 }
63 }
56
64
57 componentDidMount() {
65 componentDidMount() {
@@ -242,6 +250,8 @@ class CancelTransfer extends React.Component {
242 gasPrice={state.gasPrice}
250 gasPrice={state.gasPrice}
243 chainId={state.chainId}
251 chainId={state.chainId}
244 gasLimit={state.gasLimit}
252 gasLimit={state.gasLimit}
253+ showGasDetails={state.showGasDetails}
254+ toggleGasDetails={state.toggleGasDetails}
245 // Checks
255 // Checks
246 userApproval={state.userApproval}
256 userApproval={state.userApproval}
247 canGenerate={ canGenerate }
257 canGenerate={ canGenerate }
src/views/CreateGalaxy.js+10
@@ -64,6 +64,7 @@ class CreateGalaxy extends React.Component {
64 txApproval: false,
64 txApproval: false,
65 nonce: '',
65 nonce: '',
66 gasPrice: '5',
66 gasPrice: '5',
67+ showGasDetails: false,
67 chainId: '',
68 chainId: '',
68 txInfo: '',
69 txInfo: '',
69 gasLimit: '600000',
70 gasLimit: '600000',
@@ -75,6 +76,13 @@ class CreateGalaxy extends React.Component {
75 this.handleGalaxyNameInput = this.handleGalaxyNameInput.bind(this)
76 this.handleGalaxyNameInput = this.handleGalaxyNameInput.bind(this)
76 this.confirmAvailability = this.confirmAvailability.bind(this)
77 this.confirmAvailability = this.confirmAvailability.bind(this)
77 this.handleSubmit = this.handleSubmit.bind(this)
78 this.handleSubmit = this.handleSubmit.bind(this)
79+ this.toggleGasDetails = this.toggleGasDetails.bind(this)
80+ }
81+
82+ toggleGasDetails() {
83+ this.setState({
84+ showGasDetails: !this.state.showGasDetails
85+ })
78 }
86 }
79
87
80 componentDidMount() {
88 componentDidMount() {
@@ -266,6 +274,8 @@ class CreateGalaxy extends React.Component {
266 stx={state.stx}
274 stx={state.stx}
267 nonce={state.nonce}
275 nonce={state.nonce}
268 gasPrice={state.gasPrice}
276 gasPrice={state.gasPrice}
277+ showGasDetails={state.showGasDetails}
278+ toggleGasDetails={state.toggleGasDetails}
269 chainId={state.chainId}
279 chainId={state.chainId}
270 gasLimit={state.gasLimit}
280 gasLimit={state.gasLimit}
271 canGenerate={
281 canGenerate={
src/views/IssueChild.js+10
@@ -51,6 +51,7 @@ class IssueChild extends React.Component {
51 userApproval: false,
51 userApproval: false,
52 nonce: '',
52 nonce: '',
53 gasPrice: '5',
53 gasPrice: '5',
54+ showGasDetails: false,
54 chainId: '',
55 chainId: '',
55 gasLimit: '600000',
56 gasLimit: '600000',
56 txn: Nothing(),
57 txn: Nothing(),
@@ -70,6 +71,13 @@ class IssueChild extends React.Component {
70 this.handleSetChainId = this.handleSetChainId.bind(this)
71 this.handleSetChainId = this.handleSetChainId.bind(this)
71 this.handleSetGasPrice = this.handleSetGasPrice.bind(this)
72 this.handleSetGasPrice = this.handleSetGasPrice.bind(this)
72 this.handleSetGasLimit = this.handleSetGasLimit.bind(this)
73 this.handleSetGasLimit = this.handleSetGasLimit.bind(this)
74+ this.toggleGasDetails = this.toggleGasDetails.bind(this)
75+ }
76+
77+ toggleGasDetails() {
78+ this.setState({
79+ showGasDetails: !this.state.showGasDetails
80+ })
73 }
81 }
74
82
75 componentDidMount() {
83 componentDidMount() {
@@ -478,6 +486,8 @@ class IssueChild extends React.Component {
478 // Tx details
486 // Tx details
479 nonce={state.nonce}
487 nonce={state.nonce}
480 gasPrice={state.gasPrice}
488 gasPrice={state.gasPrice}
489+ showGasDetails={state.showGasDetails}
490+ toggleGasDetails={state.toggleGasDetails}
481 chainId={state.chainId}
491 chainId={state.chainId}
482 gasLimit={state.gasLimit}
492 gasLimit={state.gasLimit}
483 // Checks
493 // Checks
src/views/SetKeys.js+9
@@ -45,6 +45,7 @@ class SetKeys extends React.Component {
45 userApproval: false,
45 userApproval: false,
46 nonce: '',
46 nonce: '',
47 gasPrice: '5',
47 gasPrice: '5',
48+ showGasDetails: false,
48 chainId: '',
49 chainId: '',
49 gasLimit: '600000',
50 gasLimit: '600000',
50 stx: Maybe.Nothing(),
51 stx: Maybe.Nothing(),
@@ -61,8 +62,14 @@ class SetKeys extends React.Component {
61 this.handleSetChainId = this.handleSetChainId.bind(this)
62 this.handleSetChainId = this.handleSetChainId.bind(this)
62 this.handleSetGasPrice = this.handleSetGasPrice.bind(this)
63 this.handleSetGasPrice = this.handleSetGasPrice.bind(this)
63 this.handleSetGasLimit = this.handleSetGasLimit.bind(this)
64 this.handleSetGasLimit = this.handleSetGasLimit.bind(this)
65+ this.toggleGasDetails = this.toggleGasDetails.bind(this)
64 }
66 }
65
67
68+ toggleGasDetails() {
69+ this.setState({
70+ showGasDetails: !this.state.showGasDetails
71+ })
72+ }
66
73
67 componentDidMount() {
74 componentDidMount() {
68 const { props } = this
75 const { props } = this
@@ -338,6 +345,8 @@ class SetKeys extends React.Component {
338 gasPrice={state.gasPrice}
345 gasPrice={state.gasPrice}
339 chainId={state.chainId}
346 chainId={state.chainId}
340 gasLimit={state.gasLimit}
347 gasLimit={state.gasLimit}
348+ showGasDetails={state.showGasDetails}
349+ toggleGasDetails={state.toggleGasDetails}
341 // Checks
350 // Checks
342 userApproval={state.userApproval}
351 userApproval={state.userApproval}
343 canGenerate={ canGenerate }
352 canGenerate={ canGenerate }
src/views/Transfer.js+9
@@ -39,6 +39,7 @@ class Transfer extends React.Component {
39 userApproval: false,
39 userApproval: false,
40 nonce: '',
40 nonce: '',
41 gasPrice: '5',
41 gasPrice: '5',
42+ showGasDetails: false,
42 chainId: '',
43 chainId: '',
43 gasLimit: '600000',
44 gasLimit: '600000',
44 txn: Maybe.Nothing(),
45 txn: Maybe.Nothing(),
@@ -55,8 +56,14 @@ class Transfer extends React.Component {
55 this.handleSetChainId = this.handleSetChainId.bind(this)
56 this.handleSetChainId = this.handleSetChainId.bind(this)
56 this.handleSetGasPrice = this.handleSetGasPrice.bind(this)
57 this.handleSetGasPrice = this.handleSetGasPrice.bind(this)
57 this.handleSetGasLimit = this.handleSetGasLimit.bind(this)
58 this.handleSetGasLimit = this.handleSetGasLimit.bind(this)
59+ this.toggleGasDetails = this.toggleGasDetails.bind(this)
58 }
60 }
59
61
62+ toggleGasDetails() {
63+ this.setState({
64+ showGasDetails: !this.state.showGasDetails
65+ })
66+ }
60
67
61 componentDidMount() {
68 componentDidMount() {
62 const { props } = this
69 const { props } = this
@@ -311,6 +318,8 @@ class Transfer extends React.Component {
311 gasPrice={state.gasPrice}
318 gasPrice={state.gasPrice}
312 chainId={state.chainId}
319 chainId={state.chainId}
313 gasLimit={state.gasLimit}
320 gasLimit={state.gasLimit}
321+ showGasDetails={state.showGasDetails}
322+ toggleGasDetails={state.toggleGasDetails}
314 // Checks
323 // Checks
315 userApproval={state.userApproval}
324 userApproval={state.userApproval}
316 canGenerate={ canGenerate }
325 canGenerate={ canGenerate }