From aaf5d9a6cb3ea95ede239d58f1d80c12dfd481f8 Mon Sep 17 00:00:00 2001 From: Mike <41407352+hunjixin@users.noreply.github.com> Date: Wed, 25 Sep 2024 04:41:36 +0800 Subject: [PATCH] fix: wrong balance err check (#382) * fix: wrong balance err check * language update --------- Co-authored-by: James Walker --- pkg/solver/controller.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/solver/controller.go b/pkg/solver/controller.go index 4f28ed6a..f0a1934b 100644 --- a/pkg/solver/controller.go +++ b/pkg/solver/controller.go @@ -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)