Skip to content

Commit

Permalink
Fix price calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
karthikiyer56 committed Nov 14, 2024
1 parent c95cc41 commit 62c5e4d
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package processors

import (
"context"
"fmt"
"github.com/stellar/go/ingest"
"github.com/stellar/go/ingest/offers"
"github.com/stellar/go/services/horizon/internal/db2/history"
Expand Down Expand Up @@ -76,9 +75,6 @@ func (p *OffersProcessor) eventToRow(event offers.OfferEventData) history.Offer
if event.IsPassive {
flags = 1
}
fmt.Println("************")
fmt.Printf("%v", event)
fmt.Println("************")

return history.Offer{
SellerID: event.SellerId,
Expand All @@ -87,7 +83,7 @@ func (p *OffersProcessor) eventToRow(event offers.OfferEventData) history.Offer
BuyingAsset: event.BuyingAsset,
Pricen: event.PriceN,
Priced: event.PriceD,
Price: float64(event.PriceN / event.PriceD),
Price: float64(event.PriceN) / float64(event.PriceD),
Flags: flags,
LastModifiedLedger: event.LastModifiedLedger,
Sponsor: event.Sponsor,
Expand Down

0 comments on commit 62c5e4d

Please sign in to comment.