Balance and transaction exports continue to run in the background when the popup is closed or the back button is clicked as long as Mint is still open. However, the download buttons that you see on the main popup screen clear the existing state and start a new export. Now we have two balance exports running simultaneously and the progress bar jumps erratically between the first and second export job progress.
This pull request simply shows the progress screen for those download tasks if a job is already running. Since it is possible for a job to get hung up and never finish the extension will show the error screen after a certain period of inactivity. There is probably a more idiomatic way to accomplish that than a setTimeout(), but it works.
The "abandoned job" state can be tested easily with the unpacked extension.
Start an export for all account balance history
Go to chrome://extensions in a separate tab
Press the reload button next to the extension which will kill the service worker but not reset the state
Open the popup and wait for the error screen to appear
Balance and transaction exports continue to run in the background when the popup is closed or the back button is clicked as long as Mint is still open. However, the download buttons that you see on the main popup screen clear the existing state and start a new export. Now we have two balance exports running simultaneously and the progress bar jumps erratically between the first and second export job progress.
This pull request simply shows the progress screen for those download tasks if a job is already running. Since it is possible for a job to get hung up and never finish the extension will show the error screen after a certain period of inactivity. There is probably a more idiomatic way to accomplish that than a
setTimeout()
, but it works.The "abandoned job" state can be tested easily with the unpacked extension.
chrome://extensions
in a separate tab