Finalize methods for owner and foreign API were taking different paths, leading to invoice transactions not being handled correctly when finalize was called via the owner API.
Unify logic into single function and simply call the foreign version from the owner API.
Add test case to cover calling finalize with an invoice transaction from owner API
Finalize methods for owner and foreign API were taking different paths, leading to invoice transactions not being handled correctly when finalize was called via the owner API.
Fixes #635