Skip to content

Firefly III: a personal finances manager

Unset transaction source so the duplicate detector keeps working.

James Cole4ef663669c7f
diff --git a/app/Import/Storage/ImportArrayStorage.php b/app/Import/Storage/ImportArrayStorage.php
index b475b67bb6..76e2605347 100644
--- a/app/Import/Storage/ImportArrayStorage.php
+++ b/app/Import/Storage/ImportArrayStorage.php
@@ -190,7 +190,7 @@ class ImportArrayStorage
*/
private function getHash(array $transaction): string
{
- unset($transaction['importHashV2']);
+ unset($transaction['importHashV2'], $transaction['original-source']);
$json = json_encode($transaction);
if (false === $json) {
/** @noinspection ForgottenDebugOutputInspection */
diff --git a/tests/Unit/Support/Import/Routine/Spectre/StageImportDataHandlerTest.php b/tests/Unit/Support/Import/Routine/Spectre/StageImportDataHandlerTest.php
index a7ec36c8c8..82d11562fd 100644
--- a/tests/Unit/Support/Import/Routine/Spectre/StageImportDataHandlerTest.php
+++ b/tests/Unit/Support/Import/Routine/Spectre/StageImportDataHandlerTest.php
@@ -360,7 +360,7 @@ class StageImportDataHandlerTest extends TestCase
'piggy_bank_name' => null,
'bill_id' => null,
'bill_name' => null,
- 'original-source' => sprintf('spectre-v%s', config('firefly.version')),
+ 'original-source' => sprintf('spectre-v%s', config('firefly.version')),
// transaction data:
'transactions' => [
@@ -398,7 +398,7 @@ class StageImportDataHandlerTest extends TestCase
'piggy_bank_name' => null,
'bill_id' => null,
'bill_name' => null,
- 'original-source' => sprintf('spectre-v%s', config('firefly.version')),
+ 'original-source' => sprintf('spectre-v%s', config('firefly.version')),
// transaction data:
'transactions' => [
@@ -558,7 +558,7 @@ class StageImportDataHandlerTest extends TestCase
'piggy_bank_name' => null,
'bill_id' => null,
'bill_name' => null,
- 'original-source' => sprintf('spectre-v%s', config('firefly.version')),
+ 'original-source' => sprintf('spectre-v%s', config('firefly.version')),
// transaction data:
'transactions' => [
@@ -596,7 +596,7 @@ class StageImportDataHandlerTest extends TestCase
'piggy_bank_name' => null,
'bill_id' => null,
'bill_name' => null,
- 'original-source' => sprintf('spectre-v%s', config('firefly.version')),
+ 'original-source' => sprintf('spectre-v%s', config('firefly.version')),
// transaction data:
'transactions' => [