Skip to content

Commit

Permalink
multiply mid price usd by 100 to get cents
Browse files Browse the repository at this point in the history
  • Loading branch information
lazynina committed Oct 29, 2024
1 parent 1fc58b7 commit 6f22d88
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions routes/base.go
Original file line number Diff line number Diff line change
Expand Up @@ -347,11 +347,11 @@ func (fes *APIServer) GetExchangeRateFromDeSoDex() (float64, error) {

usdcPKID := utxoView.GetPKIDForPublicKey(usdcProfileEntry.PublicKey)

midPriceDESO, _, _, err := fes.GetHighestBidAndLowestAskPriceFromPKIDs(&lib.ZeroPKID, usdcPKID.PKID, utxoView, 0)
midPriceUSD, _, _, err := fes.GetHighestBidAndLowestAskPriceFromPKIDs(&lib.ZeroPKID, usdcPKID.PKID, utxoView, 0)
if err != nil {
return 0, err
}
return midPriceDESO, nil
return midPriceUSD * 100, nil
}

// UpdateUSDCentsToDeSoExchangeRate updates app state's USD Cents per DeSo value
Expand Down

0 comments on commit 6f22d88

Please sign in to comment.