diff --git a/internal/prices/accessor.go b/internal/prices/accessor.go index 4ba60f865..1e145723e 100755 --- a/internal/prices/accessor.go +++ b/internal/prices/accessor.go @@ -60,7 +60,7 @@ func MapPrices(chainID uint64) map[common.Address]*bigNumber.Int { **********************************************************************************************/ func FindPrice(chainID uint64, tokenAddress common.Address) (*bigNumber.Int, bool) { syncMap := initOrGetPriceMap(chainID) - price, ok := syncMap.Load(tokenAddress) + price, ok := syncMap.Load(tokenAddress.Hex()) if !ok { return nil, false } diff --git a/internal/strategies/build.go b/internal/strategies/build.go index 47a858a24..0a4bd9675 100755 --- a/internal/strategies/build.go +++ b/internal/strategies/build.go @@ -53,7 +53,7 @@ func BuildRiskScore(t *models.TStrategy) *models.TStrategyFromRisk { _tokenPrice, ok := prices.FindPrice(t.ChainID, tokenData.Address) if !ok { traces. - Capture(`warn`, `impossible to find tokenPrice for token `+tokenData.Address.Hex()). + Capture(`warn`, `impossible to find tokenPrice for token `+tokenData.Address.Hex()+` on chain `+strconv.FormatUint(t.ChainID, 10)). SetEntity(`strategy`). SetTag(`chainID`, strconv.FormatUint(t.ChainID, 10)). SetTag(`rpcURI`, ethereum.GetRPCURI(t.ChainID)). diff --git a/internal/strategies/risk.framework.go b/internal/strategies/risk.framework.go index 0bb426b12..5e0f7bae9 100755 --- a/internal/strategies/risk.framework.go +++ b/internal/strategies/risk.framework.go @@ -297,7 +297,7 @@ func computeRiskGroupAllocation(chainID uint64) { tokenPrice, ok := prices.FindPrice(chainID, tokenData.Address) if !ok { traces. - Capture(`warn`, `impossible to find tokenPrice for token `+tokenData.Address.Hex()). + Capture(`warn`, `impossible to find tokenPrice for token `+tokenData.Address.Hex()+` on chain `+strconv.FormatUint(chainID, 10)). SetEntity(`strategy`). SetTag(`chainID`, strconv.FormatUint(chainID, 10)). SetTag(`rpcURI`, ethereum.GetRPCURI(chainID)).