@@ -9,7 +9,7 @@ import { renderSignedTx, signTransaction } from '../lib/txn'
10const StatelessTransaction = props => {
10const StatelessTransaction = props => {
11 const { web3, gasPrice, gasLimit, nonce, chainId } = props
11 const { web3, gasPrice, gasLimit, nonce, chainId } = props
12− const { setNonce, setChainId, setGasLimit, setGasPrice } = props
12+ const { setNonce, setChainId, setGasLimit, setGasPrice, showGasDetails, toggleGasDetails } = props
13 const { txn, stx, createUnsignedTxn } = props
13 const { txn, stx, createUnsignedTxn } = props
14 const { canSign, canGenerate, canApprove } = props
14 const { canSign, canGenerate, canApprove } = props
15 const { setUserApproval, userApproval } = props
15 const { setUserApproval, userApproval } = props
@@ -18,6 +18,10 @@ const StatelessTransaction = props => {
18 // setState doesn't seem to work in SetProxy/handleSubmit, so just
18 // setState doesn't seem to work in SetProxy/handleSubmit, so just
19 // modifying the DOM manually here. (https://imgur.com/a/i0Qsyq1)
19 // modifying the DOM manually here. (https://imgur.com/a/i0Qsyq1)
21+ const handleRangeChange = (e) => {
22+ setGasPrice(e.target.value);
21 const sendTxn = (e) => {
25 const sendTxn = (e) => {
22 e.target.setAttribute("disabled", true);
26 e.target.setAttribute("disabled", true);
23 let spinner = e.target.querySelectorAll('.btn-spinner')[0];
27 let spinner = e.target.querySelectorAll('.btn-spinner')[0];
@@ -59,6 +63,31 @@ const StatelessTransaction = props => {
59 </React.Fragment>
63 </React.Fragment>
66+ const gasPriceRangeDialogue = (
68+ <div className="mt-8">Gas Price: <span className="ml-4 text-700 text-sm">{gasPrice} gwei</span></div>
77+ onChange={handleRangeChange}
80+ <div className="flex space-between text-sm mb-8">
87+ const toggleGasDetailsDialogue = (
88+ <a href="javascript:void(0)" onClick={toggleGasDetails}>Gas Details</a>
62 const gasPriceDialogue =
91 const gasPriceDialogue =
64 className={ 'mono mt-4' }
93 className={ 'mono mt-4' }
@@ -182,8 +211,15 @@ const StatelessTransaction = props => {
182 { generateTxnButton }
211 { generateTxnButton }
183 { unsignedTxnDisplay }
212 { unsignedTxnDisplay }
214+ { gasPriceRangeDialogue }
215+ { toggleGasDetailsDialogue }
185− { gasPriceDialogue }
219+ { gasPriceDialogue }
186− { gasLimitDialogue }
220+ { gasLimitDialogue }
187 { onlineParamsDialogue }
223 { onlineParamsDialogue }
189 { signTxnButton }
225 { signTxnButton }