node icon indicating copy to clipboard operation
node copied to clipboard

Simplify tx type selection in EVM TryProcessOutTx

Open kevinssgh opened this issue 1 year ago • 0 comments

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.

kevinssgh avatar Mar 05 '24 17:03 kevinssgh