node
node copied to clipboard
Simplify tx type selection in EVM TryProcessOutTx
The logic to select which type of transaction to be signed is using a long chain of else if's. It is difficult to read or understand which tx type is being signed without analyzing each code block.
This can be simplified by extracting the conditional statements and execution into separate functions in another file. Each condition can be mapped to a const labelling the tx type or situation. In TryProcessOut a switch can be used so that the logic is clear.