~singpolyma/jmp-pay

673a9b97f7fb10e6a0f242cfff1857815d6367c8 — Stephen Paul Weber 2 years ago 446a4fd
Do not warn about BTC tx <= 0

This is a valid case for when we have sent BTC received at this address out.
1 files changed, 2 insertions(+), 1 deletions(-)

M bin/process_pending_btc_transactions
M bin/process_pending_btc_transactions => bin/process_pending_btc_transactions +2 -1
@@ 247,7 247,8 @@ done = REDIS.hgetall("pending_btc_transactions").map do |(txid, customer_id)|
	next unless transaction.confirmations >= CONFIG[:required_confirmations]
	btc = transaction.amount_for(address)
	if btc <= 0
		warn "Transaction shows as #{btc}, skipping #{txid}"
		# This is a send, not a receive, do not record it
		REDIS.hdel("pending_btc_transactions", txid)
		next
	end
	DB.transaction do