From e6750afc8dd1857c99ff8d077b471138814c4f30 Mon Sep 17 00:00:00 2001 From: Vladyslav Budichenko Date: Mon, 23 Sep 2024 11:03:00 -0400 Subject: [PATCH] feat: removed sdk.Int --- alerts/auctions/calc.go | 2 +- alerts/auctions/data.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/alerts/auctions/calc.go b/alerts/auctions/calc.go index 1685006..6bbbfe3 100644 --- a/alerts/auctions/calc.go +++ b/alerts/auctions/calc.go @@ -35,7 +35,7 @@ func CalculateTotalAuctionsUSDValue(data *AuctionData) (sdk.Dec, error) { return totalValue, nil } -// calculateUSDValue calculates the USD value of a given Coin and AssetInfo +// CalculateUSDValue calculates the USD value of a given Coin and AssetInfo func CalculateUSDValue(coin sdk.Coin, assetInfo AssetInfo) sdk.Dec { return coin.Amount.ToLegacyDec().Quo(assetInfo.ConversionFactor.ToLegacyDec()).Mul(assetInfo.Price) } diff --git a/alerts/auctions/data.go b/alerts/auctions/data.go index 14048df..32027d9 100644 --- a/alerts/auctions/data.go +++ b/alerts/auctions/data.go @@ -84,7 +84,7 @@ func GetAuctionData(client AuctionClient) (*AuctionData, error) { func deduplicateMarkets(cdpMarkets cdptypes.CollateralParams, hardMarkets hardtypes.MoneyMarkets) []auctionMarket { seenDenoms := make(map[string]bool) - markets := []auctionMarket{} + markets := make([]auctionMarket, 0) for _, cdpMarket := range cdpMarkets { _, seen := seenDenoms[cdpMarket.Denom]