Skip to content

Commit

Permalink
add more source for get rate
Browse files Browse the repository at this point in the history
  • Loading branch information
JustinBeBoy committed May 20, 2024
1 parent ed1bc18 commit fb04f34
Show file tree
Hide file tree
Showing 14 changed files with 178 additions and 99 deletions.
2 changes: 1 addition & 1 deletion libwallet/assets_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,7 @@ func (mgr *AssetsManager) CalculateAssetsUSDBalance(balances map[utils.AssetType
return nil, fmt.Errorf("the USD exchange rate is disabled")
}

usdBalance := func(bal sharedW.AssetAmount, market string) (float64, error) {
usdBalance := func(bal sharedW.AssetAmount, market values.Market) (float64, error) {
rate := mgr.RateSource.GetTicker(market, true)
if rate == nil || rate.LastTradePrice <= 0 {
return 0, fmt.Errorf("no rate information available")
Expand Down
Loading

0 comments on commit fb04f34

Please sign in to comment.