From 504b04533245a519ed52bd6e541a4ab06144da61 Mon Sep 17 00:00:00 2001 From: Josh Rickmar Date: Wed, 4 May 2016 15:01:44 -0400 Subject: [PATCH] Fix credit slice indexing for transaction notifications. Previously, this would always check a transaction output index against the 0th credit's index. --- wallet/notifications.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wallet/notifications.go b/wallet/notifications.go index 729e50c..c71c4c9 100644 --- a/wallet/notifications.go +++ b/wallet/notifications.go @@ -119,8 +119,8 @@ func makeTxSummary(w *Wallet, details *wtxmgr.TxDetails) TransactionSummary { } } outputs := make([]TransactionSummaryOutput, 0, len(details.MsgTx.TxOut)) - var credIndex int for i := range details.MsgTx.TxOut { + credIndex := len(outputs) mine := len(details.Credits) > credIndex && details.Credits[credIndex].Index == uint32(i) if !mine { continue