lib/zold/wallet.rb
def max
      negative = txns.select { |t| t.amount.negative? }
      negative.empty? ? 0 : negative.max_by(&:id).id
    end
def max
      negative = txns.select { |t| t.amount.negative? }
      negative.empty? ? 0 : negative.max_by(&:id).id
    end
def max negative = txns . select { | t | t . amount . negative? } negative . empty? ? 0 : negative . max_by ( :id ) . id end
Calculate the maximum transaction ID visible currently in the wallet.
 We go through them all and find the largest number. If there are
 no transactions, zero is returned.
Calculate the maximum transaction ID visible currently in the wallet . We go through them all and find the largest number . If there are no transactions zero is returned .