Skip to content

Commit

Permalink
Don't duplecate transactions to self
Browse files Browse the repository at this point in the history
close #113
  • Loading branch information
catena2w committed Jun 28, 2016
1 parent d579fee commit 0b7ef34
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ trait AccountTransactionsHistory {
def accountTransactions(address: String): Array[_ <: Transaction] = {
Account.isValidAddress(address) match {
case false => Array()
case true =>
val acc = new Account(address)
accountTransactions(acc)
case true => accountTransactions(new Account(address)).distinct
}
}

Expand Down

1 comment on commit 0b7ef34

@atapin
Copy link

@atapin atapin commented on 0b7ef34 Aug 26, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pattern matching a boolean value is bad practice. If-else is preferred.

Please sign in to comment.