Skip to content

Commit

Permalink
Generically hide Revolut top ups from AIB output
Browse files Browse the repository at this point in the history
  • Loading branch information
stonish authored and --global committed Jun 8, 2022
1 parent fccf994 commit 05dffca
Showing 1 changed file with 9 additions and 16 deletions.
25 changes: 9 additions & 16 deletions transactions/aibTransaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,22 +108,7 @@ func (t aibTransaction) shouldHide() bool {
return true
}

if t.details == "VDP-Revolut**2734*" ||
t.details == "VDP-Revolut**4772*" ||
t.details == "VDP-REVOLUT*4772*" ||
t.details == "VDP-REVOLUT*2484*" ||
t.details == "VDP-Revolut* - 477" ||
t.details == "VDP-Revolut - 477" ||
t.details == "VDP-Revolut - 107" ||
t.details == "VDP-Revolut - 652" ||
t.details == "VDP-Revolut - 281" ||
t.details == "VDP-Revolut - 230" ||
t.details == "VDP-Revolut - 246" ||
t.details == "VDP-Revolut - 385" ||
t.details == "VDP-Revolut - 975" ||
t.details == "VDP-Revolut - 341" ||
t.details == "VDP-Revolut - 973" ||
t.details == "VDP-Revolut**9510*" {
if t.isRevolutTopUp() {
return true
}

Expand All @@ -143,3 +128,11 @@ func (t aibTransaction) shouldHide() bool {

return false
}

func (t aibTransaction) isRevolutTopUp() bool {
return strings.HasPrefix(t.details, "VDP-Revolut**") ||
strings.HasPrefix(t.details, "VDP-Revolut* - ") ||
strings.HasPrefix(t.details, "VDP-Revolut - ") ||
strings.HasPrefix(t.details, "VDP-REVOLUT*") ||
t.details == "VDP-Revolut"
}

0 comments on commit 05dffca

Please sign in to comment.