From 43cd399c181d41c5e6e2fd513d5c1766584b513a Mon Sep 17 00:00:00 2001 From: Steven Polley Date: Thu, 23 Jan 2025 23:31:25 -0700 Subject: [PATCH] Fix concurrent error handling for BTC provider --- providers/bitcoin/providerImpl.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/providers/bitcoin/providerImpl.go b/providers/bitcoin/providerImpl.go index a43a29a..38da0fc 100644 --- a/providers/bitcoin/providerImpl.go +++ b/providers/bitcoin/providerImpl.go @@ -55,8 +55,10 @@ func (p *Provider) GetBalances() ([]int, []string, error) { defer wg.Done() addressResponse, err := p.client.getAddress(bitcoinAddress) if err != nil { - err := fmt.Errorf("failed to get bitcoin address '%s': %v", bitcoinAddress, err) - goErr = &err + err := fmt.Errorf("failed to get BTC balance for bitcoin address '%s': %v", bitcoinAddress, err) + if err != nil { + goErr = &err + } return } satoshiBalance += addressResponse.ChainStats.FundedTxoSum - addressResponse.ChainStats.SpentTxoSum