Skip to content

Commit

Permalink
Displayio: Make imp.bidfloor optional (#3959)
Browse files Browse the repository at this point in the history
  • Loading branch information
xdevel authored Oct 16, 2024
1 parent b56923c commit 8134328
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 47 deletions.
15 changes: 3 additions & 12 deletions adapters/displayio/displayio.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,27 +37,18 @@ func (adapter *adapter) MakeRequests(request *openrtb2.BidRequest, requestInfo *
for _, impression := range request.Imp {
var requestExt map[string]interface{}

if impression.BidFloor == 0 {
errs = append(errs, &errortypes.BadInput{
Message: "BidFloor should be defined",
})
continue
}

if impression.BidFloorCur == "" {
if impression.BidFloorCur == "" || impression.BidFloor == 0 {
impression.BidFloorCur = "USD"
}

if impression.BidFloorCur != "USD" {
} else if impression.BidFloorCur != "USD" {
convertedValue, err := requestInfo.ConvertCurrency(impression.BidFloor, impression.BidFloorCur, "USD")

if err != nil {
errs = append(errs, err)
continue
}

impression.BidFloorCur = "USD"
impression.BidFloor = convertedValue
impression.BidFloorCur = "USD"
}

if len(impression.Ext) == 0 {
Expand Down

This file was deleted.

0 comments on commit 8134328

Please sign in to comment.