diff --git a/services/wallet/api.go b/services/wallet/api.go index 934023873..041d12153 100644 --- a/services/wallet/api.go +++ b/services/wallet/api.go @@ -29,6 +29,7 @@ import ( wcommon "github.com/status-im/status-go/services/wallet/common" "github.com/status-im/status-go/services/wallet/currency" "github.com/status-im/status-go/services/wallet/history" + "github.com/status-im/status-go/services/wallet/market" "github.com/status-im/status-go/services/wallet/onramp" "github.com/status-im/status-go/services/wallet/requests" "github.com/status-im/status-go/services/wallet/responses" @@ -445,6 +446,16 @@ func (api *API) GetEthereumChains(ctx context.Context) ([]*network.CombinedNetwo return api.s.rpcClient.NetworkManager.GetCombinedNetworks() } +func (api *API) GetOrFetchPrices(ctx context.Context, symbols []string, currencies []string) (market.DataPerTokenAndCurrency, error) { + log.Debug("call to GetOrFetchPrices") + return api.s.marketManager.GetOrFetchPrices(symbols, currencies, market.MaxAgeInSecondsForBalances) +} + +func (api *API) GetOrFetchTokenMarketValues(ctx context.Context, symbols []string, currency string) (map[string]thirdparty.TokenMarketValues, error) { + log.Debug("call to GetOrFetchTokenMarketValues") + return api.s.marketManager.GetOrFetchTokenMarketValues(symbols, currency, market.MaxAgeInSecondsForBalances) +} + // @deprecated func (api *API) FetchPrices(ctx context.Context, symbols []string, currencies []string) (map[string]map[string]float64, error) { log.Debug("call to FetchPrices")