Wallet api got functions to get or fetch prices and token balances
This commit is contained in:
parent
132ea05fc8
commit
4f54989f9f
|
@ -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")
|
||||
|
|
Loading…
Reference in New Issue