Skip to content

Commit

Permalink
fix: wrong balance err check (#382)
Browse files Browse the repository at this point in the history
* fix: wrong balance err check

* language update

---------

Co-authored-by: James Walker <walkah@walkah.net>
  • Loading branch information
hunjixin and walkah authored Sep 24, 2024
1 parent 6353895 commit aaf5d9a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/solver/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ func (controller *SolverController) addResourceOffer(resourceOffer data.Resource
requiredBalanceWei := web3.EtherToWei(float64(resourceOffer.DefaultPricing.InstructionPrice))
// If the balance is less than the required balance, don't add the resource offer
if balance.Cmp(requiredBalanceWei) < 0 {
return nil, err
return nil, fmt.Errorf("address %s doesn't have enough funds. required balance is %s but expected balance is %s", resourceOffer.ResourceProvider, requiredBalanceWei, balance)
}

controller.log.Info("add resource offer", resourceOffer)
Expand Down

0 comments on commit aaf5d9a

Please sign in to comment.