refactor: simplified CSV testing

This commit is contained in:
André Sá 2022-08-02 15:50:48 +01:00 committed by Rafael
parent 4dc4d14742
commit eed09b52ca

View file

@ -141,14 +141,14 @@ function batch (
return Promise.all(promises)
.then(packager)
.then(res => {
if (simplified) return simplifiedBatch(res)
.then(res =>
!isCsvExport ? res :
// GQL transactions and transactionsCsv both use this function and
// if we don't check for the correct simplified value, the Transactions page polling
// will continuously build a csv in the background
else if (simplified === false) return advancedBatch(res)
return res
})
simplified ? simplifiedBatch(res) :
advancedBatch(res)
)
}
function advancedBatch (data) {