Adjust to final step on rejected/completed
This commit is contained in:
		
							parent
							
								
									d2494d1425
								
							
						
					
					
						commit
						d992c642ff
					
				| @ -307,6 +307,8 @@ class ExecuteContract extends Component { | |||||||
|     const { api, store } = this.context; |     const { api, store } = this.context; | ||||||
|     const { fromAddress } = this.props; |     const { fromAddress } = this.props; | ||||||
|     const { amount, func, gasEdit, values } = this.state; |     const { amount, func, gasEdit, values } = this.state; | ||||||
|  |     const steps = gasEdit ? STAGES_GAS : STAGES_BASIC; | ||||||
|  |     const finalstep = steps.length - 1; | ||||||
|     const options = { |     const options = { | ||||||
|       gas: this.gasStore.gas, |       gas: this.gasStore.gas, | ||||||
|       gasPrice: this.gasStore.price, |       gasPrice: this.gasStore.price, | ||||||
| @ -325,7 +327,7 @@ class ExecuteContract extends Component { | |||||||
|           .pollMethod('parity_checkRequest', requestId) |           .pollMethod('parity_checkRequest', requestId) | ||||||
|           .catch((error) => { |           .catch((error) => { | ||||||
|             if (error.code === ERROR_CODES.REQUEST_REJECTED) { |             if (error.code === ERROR_CODES.REQUEST_REJECTED) { | ||||||
|               this.setState({ rejected: true }); |               this.setState({ rejected: true, step: finalstep }); | ||||||
|               return false; |               return false; | ||||||
|             } |             } | ||||||
| 
 | 
 | ||||||
| @ -333,7 +335,7 @@ class ExecuteContract extends Component { | |||||||
|           }); |           }); | ||||||
|       }) |       }) | ||||||
|       .then((txhash) => { |       .then((txhash) => { | ||||||
|         this.setState({ sending: false, step: 2, txhash, busyState: 'Your transaction has been posted to the network' }); |         this.setState({ sending: false, step: finalstep, txhash, busyState: 'Your transaction has been posted to the network' }); | ||||||
|       }) |       }) | ||||||
|       .catch((error) => { |       .catch((error) => { | ||||||
|         console.error('postTransaction', error); |         console.error('postTransaction', error); | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user