Fix concurrent error handling for BTC provider
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Steven Polley 2025-01-23 23:31:25 -07:00
parent 88552ba042
commit 43cd399c18

View File

@ -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)
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