on master help sign in
- Disable sendTransaction button upon sending
commit1031df9fa45f6e95538f1772da58ffaebb0c1ef5 authorChris Johnson <chris@cjohnson.io> dateWed 6 Mar 2019, 18:30 (8 years ago) parent1c70c92
1 file changed+6−1
src/components/StatelessTransaction.js+6−1
src/components/StatelessTransaction.js+6−1
@@ -15,6 +15,11 @@ const StatelessTransaction = props => {
1515 const { setUserApproval, userApproval } = props
1616 const { canSend, handleSubmit } = props
1717
18+ const sendTxn = (e) => {
19+ e.target.setAttribute("disabled", true);
20+ handleSubmit()
21+ }
22+
1823 const generateButtonColor =
1924 Nothing.hasInstance(txn)
2025 ? 'blue'
@@ -150,7 +155,7 @@ const StatelessTransaction = props => {
150155 prop-size={ 'xl wide' }
151156 className={ 'mt-8' }
152157 disabled={ !canSend }
153− onClick={ handleSubmit }
158+ onClick={ sendTxn }
154159 >
155160 { 'Send Transaction' }
156161 </Button>