TRON driver update
This commit is contained in:
@@ -69,12 +69,12 @@ func (a *WalletAPI) getWalletBalance(r *http.Request, account *model.Account, to
|
||||
bal, err := a.queryBalanceFromGateways(ctx, cryptoGateways, walletRef)
|
||||
if err != nil {
|
||||
a.logger.Warn("Failed to fetch wallet balance from gateways", zap.Error(err), zap.String("wallet_ref", walletRef))
|
||||
return response.Auto(a.logger, mservice.ChainGateway, err)
|
||||
return response.Auto(a.logger, a.Name(), err)
|
||||
}
|
||||
|
||||
if bal == nil {
|
||||
a.logger.Warn("Wallet balance not found on any gateway", zap.String("wallet_ref", walletRef))
|
||||
return response.Auto(a.logger, mservice.ChainGateway, merrors.NoData("wallet not found"))
|
||||
return response.Auto(a.logger, a.Name(), merrors.NoData("wallet not found"))
|
||||
}
|
||||
|
||||
return sresponse.WalletBalanceFromConnector(a.logger, bal, token)
|
||||
|
||||
Reference in New Issue
Block a user