fix how native sizes are passed in AppNexus adapter #3832
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Type of change
Description of change
This PR fixes a bug with how native sizes were passed into the UT request for the appNexusBidAdapter.
Previously the sizes for
native.image
andnative.icon
were passed as is into the request (iesizes: [150, 100]
was left in this state).The UT needs these sizes converted to an object notation like the following:
sizes: [{width: 150, height: 100}]
With the changes, if we detect that someone passes the array of sizes (or an array of multiple array sizes), we'll convert the value to the proper format.
Additionally, I removed the
minimumParams
logic for thesizes
as this was deemed unnecessary per further internal conversation. If there are no sizes supplied for a native asset, we do not need to pass an empty object array in the UT request; we can just not include the field and it would work.