Skip to content

Commit

Permalink
fixed summary amount calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
donSchoe committed Jan 5, 2014
1 parent ea32746 commit 40b91b6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions btc_chain.rb
Expand Up @@ -95,9 +95,6 @@ def parse_tx(hi=nil, time=nil, tx)
@day += 86400
end

# sums up donated BTC value
@sum += value

# gets UTC timestamp
stamp = Time.at(time.to_i).utc

Expand Down Expand Up @@ -146,6 +143,9 @@ def parse_tx(hi=nil, time=nil, tx)
printval = outval - presum
end

# sums up donated BTC value
@sum += printval

# prints donation stats if input value is above 0
if printval > 0
puts "\"" + hi.to_s + "\";\"" + stamp.to_s + "\";\"" + key.to_s + "\";\"" + printval.round(8).to_s + "\";\"" + @sum.round(8).to_s + "\";\"" + @ags.round(8).to_s + "\""
Expand Down
6 changes: 3 additions & 3 deletions pts_chain.rb
Expand Up @@ -95,9 +95,6 @@ def parse_tx(hi=nil, time=nil, tx)
@day += 86400
end

# sums up donated PTS value
@sum += value

# gets UTC timestamp
stamp = Time.at(time.to_i).utc

Expand Down Expand Up @@ -146,6 +143,9 @@ def parse_tx(hi=nil, time=nil, tx)
printval = outval - presum
end

# sums up donated PTS value
@sum += printval

# prints donation stats if input value is above 0
if printval > 0
puts "\"" + hi.to_s + "\";\"" + stamp.to_s + "\";\"" + key.to_s + "\";\"" + printval.round(8).to_s + "\";\"" + @sum.round(8).to_s + "\";\"" + @ags.round(8).to_s + "\""
Expand Down

0 comments on commit 40b91b6

Please sign in to comment.