Created by: mtlynch
Following #2456, this further refactors the Wallet.applyHistory function by splitting the body of the giant loop it contains into a separate method.
This reduces the 176 LOC method to 170 LOC and reduces the control flow nesting depth by 1.
This change is