-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding schain info #26
Adding schain info #26
Conversation
modules/33acrossBidAdapter.js
Outdated
// of the above conditions fail. | ||
function _isValidSchain(schain) { | ||
//Check of nodes are valid | ||
if(!schain.nodes || !schain.nodes.length > 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe change !schain.nodes.length > 0
to !(schain.nodes.length > 0)
or schain.nodes.length < 1
for easy readability
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is schain.nodes.length < 1
more readable than !schain.nodes.length > 0
?
I will add the paren to make it clear.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because !schain.nodes.length > 0
will do this (!schain.nodes.length) > 0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yikes yes you are correct. Thank you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a bug then not just readability issue? Hmm how did my valid schain unit test pass then? Because !1 > 0
evaluates to false
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because it will covert the boolean to number and then compare with 0, eg. number(boolean(length))
so if not empty array, it will return 0, and empty array will return 1, which still satisfied the x>0
logic
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haha I replied first. But thanks for spotting this. Fixed by adding paren.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lol, okok, you win...btw, are you keep refreshing the page??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my page does not auto update the comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah no I did not refresh page. But I also notice that only a page refresh updates comments. Not like gitlab
modules/33acrossBidAdapter.js
Outdated
const requiredFields = ['asi', 'sid', 'hp']; | ||
|
||
return schain.nodes.every((node)=> { | ||
return requiredFields.every((field)=> node[field]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does empty string and 0 fail this check?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should yes. The values of asi
, sid
should be a valid string and hp
should be 1+.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's what the validation is based on https://github.com/InteractiveAdvertisingBureau/openrtb/blob/master/supplychainobject.md#openrtb-object-supplychain
Too strict?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i see, that make sense
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure how strictly we want to validate here. But this would pass if hp
had any valid string or boolean true
value too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right that is true (no pun intended). Hmm I guess this only checks for truthy values. Should we enforce proper validation here?
modules/33acrossBidAdapter.js
Outdated
} | ||
|
||
// Check for required fields in nodes | ||
const requiredFields = ['asi', 'sid', 'hp']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is interesting. I wonder if we need to add this to our validation too for schain nodes.
modules/33acrossBidAdapter.js
Outdated
const requiredFields = ['asi', 'sid', 'hp']; | ||
|
||
return schain.nodes.every((node)=> { | ||
return requiredFields.every((field)=> node[field]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure how strictly we want to validate here. But this would pass if hp
had any valid string or boolean true
value too?
* add Rise adapter * fixes * change param isOrg to org * Rise adapter * change email for rise * fix circle failed * bump * bump * bump * remove space * Upgrade Rise adapter to 5.0 * added isWrapper param * addes is_wrapper parameter to documentation * added is_wrapper to test * removed isWrapper * Rise Bid Adapter: support Coppa param (#24) * MinuteMedia Bid Adapter: support Coppa param (#25) * Revert "MinuteMedia Bid Adapter: support Coppa param (#25)" (#26) This reverts commit 66c4e7b. * bump * update coppa fetch * setting coppa param update * update Coppa tests * update test naming --------- Co-authored-by: Noam Tzuberi <noam.tzuberi@ironsrc.com> Co-authored-by: noamtzu <noamtzu@gmail.com> Co-authored-by: Noam Tzuberi <noamtzu@users.noreply.github.com> Co-authored-by: Laslo Chechur <laslo.chechur@ironsrc.com> Co-authored-by: OronW <41260031+OronW@users.noreply.github.com> Co-authored-by: lasloche <62240785+lasloche@users.noreply.github.com> Co-authored-by: inna <innayare@gmail.com> Co-authored-by: YakirLavi <yakir.lavi@risecodes.com>
* add Rise adapter * fixes * change param isOrg to org * Rise adapter * change email for rise * fix circle failed * bump * bump * bump * remove space * Upgrade Rise adapter to 5.0 * added isWrapper param * addes is_wrapper parameter to documentation * added is_wrapper to test * removed isWrapper * Rise Bid Adapter: support Coppa param (#24) * MinuteMedia Bid Adapter: support Coppa param (#25) * Revert "MinuteMedia Bid Adapter: support Coppa param (#25)" (#26) This reverts commit 66c4e7b. * bump * update coppa fetch * setting coppa param update * update Coppa tests * update test naming * Rise Bid Adapter: support plcmt and sua (#27) --------- Co-authored-by: Noam Tzuberi <noam.tzuberi@ironsrc.com> Co-authored-by: noamtzu <noamtzu@gmail.com> Co-authored-by: Noam Tzuberi <noamtzu@users.noreply.github.com> Co-authored-by: Laslo Chechur <laslo.chechur@ironsrc.com> Co-authored-by: OronW <41260031+OronW@users.noreply.github.com> Co-authored-by: lasloche <62240785+lasloche@users.noreply.github.com> Co-authored-by: inna <innayare@gmail.com> Co-authored-by: YakirLavi <yakir.lavi@risecodes.com>
* add Rise adapter * fixes * change param isOrg to org * Rise adapter * change email for rise * fix circle failed * bump * bump * bump * remove space * Upgrade Rise adapter to 5.0 * added isWrapper param * addes is_wrapper parameter to documentation * added is_wrapper to test * removed isWrapper * Rise Bid Adapter: support Coppa param (#24) * MinuteMedia Bid Adapter: support Coppa param (#25) * Revert "MinuteMedia Bid Adapter: support Coppa param (#25)" (#26) This reverts commit 66c4e7b. * bump * update coppa fetch * setting coppa param update * update Coppa tests * update test naming * support plcmt and sua params + tests --------- Co-authored-by: Noam Tzuberi <noam.tzuberi@ironsrc.com> Co-authored-by: noamtzu <noamtzu@gmail.com> Co-authored-by: Noam Tzuberi <noamtzu@users.noreply.github.com> Co-authored-by: Laslo Chechur <laslo.chechur@ironsrc.com> Co-authored-by: OronW <41260031+OronW@users.noreply.github.com> Co-authored-by: lasloche <62240785+lasloche@users.noreply.github.com> Co-authored-by: inna <innayare@gmail.com> Co-authored-by: YakirLavi <yakir.lavi@risecodes.com>
* add Rise adapter * fixes * change param isOrg to org * Rise adapter * change email for rise * fix circle failed * bump * bump * bump * remove space * Upgrade Rise adapter to 5.0 * added isWrapper param * addes is_wrapper parameter to documentation * added is_wrapper to test * removed isWrapper * Rise Bid Adapter: support Coppa param (#24) * MinuteMedia Bid Adapter: support Coppa param (#25) * Revert "MinuteMedia Bid Adapter: support Coppa param (#25)" (#26) This reverts commit 66c4e7b. * bump * update coppa fetch * setting coppa param update * update Coppa tests * update test naming * Rise Bid Adapter: support plcmt and sua (#27) * update minuteMediaBidAdapter - support missing params (#29) --------- Co-authored-by: Noam Tzuberi <noam.tzuberi@ironsrc.com> Co-authored-by: noamtzu <noamtzu@gmail.com> Co-authored-by: Noam Tzuberi <noamtzu@users.noreply.github.com> Co-authored-by: Laslo Chechur <laslo.chechur@ironsrc.com> Co-authored-by: OronW <41260031+OronW@users.noreply.github.com> Co-authored-by: lasloche <62240785+lasloche@users.noreply.github.com> Co-authored-by: inna <innayare@gmail.com> Co-authored-by: YakirLavi <yakir.lavi@risecodes.com>
* add Rise adapter * fixes * change param isOrg to org * Rise adapter * change email for rise * fix circle failed * bump * bump * bump * remove space * Upgrade Rise adapter to 5.0 * added isWrapper param * addes is_wrapper parameter to documentation * added is_wrapper to test * removed isWrapper * Rise Bid Adapter: support Coppa param (#24) * MinuteMedia Bid Adapter: support Coppa param (#25) * Revert "MinuteMedia Bid Adapter: support Coppa param (#25)" (#26) This reverts commit 66c4e7b. * bump * update coppa fetch * setting coppa param update * update Coppa tests * update test naming * Rise Bid Adapter: support plcmt and sua (#27) * update minuteMediaBidAdapter - support missing params (#29) * RIseBidAdapter: support currency (#35) --------- Co-authored-by: Noam Tzuberi <noam.tzuberi@ironsrc.com> Co-authored-by: noamtzu <noamtzu@gmail.com> Co-authored-by: Noam Tzuberi <noamtzu@users.noreply.github.com> Co-authored-by: Laslo Chechur <laslo.chechur@ironsrc.com> Co-authored-by: OronW <41260031+OronW@users.noreply.github.com> Co-authored-by: lasloche <62240785+lasloche@users.noreply.github.com> Co-authored-by: inna <innayare@gmail.com> Co-authored-by: YakirLavi <yakir.lavi@risecodes.com>
* add Rise adapter * fixes * change param isOrg to org * Rise adapter * change email for rise * fix circle failed * bump * bump * bump * remove space * Upgrade Rise adapter to 5.0 * added isWrapper param * addes is_wrapper parameter to documentation * added is_wrapper to test * removed isWrapper * Rise Bid Adapter: support Coppa param (#24) * MinuteMedia Bid Adapter: support Coppa param (#25) * Revert "MinuteMedia Bid Adapter: support Coppa param (#25)" (#26) This reverts commit 66c4e7b. * bump * update coppa fetch * setting coppa param update * update Coppa tests * update test naming * Rise Bid Adapter: support plcmt and sua (#27) * update minuteMediaBidAdapter - support missing params (#29) * add currency param to bid object and tests * update getFloor function and tests * adding test to currency param * adding doc & currency bidfloor support & update tests * update currency test * remove default test --------- Co-authored-by: Noam Tzuberi <noam.tzuberi@ironsrc.com> Co-authored-by: noamtzu <noamtzu@gmail.com> Co-authored-by: Noam Tzuberi <noamtzu@users.noreply.github.com> Co-authored-by: Laslo Chechur <laslo.chechur@ironsrc.com> Co-authored-by: OronW <41260031+OronW@users.noreply.github.com> Co-authored-by: lasloche <62240785+lasloche@users.noreply.github.com> Co-authored-by: inna <innayare@gmail.com> Co-authored-by: YakirLavi <yakir.lavi@risecodes.com>
* add Rise adapter * fixes * change param isOrg to org * Rise adapter * change email for rise * fix circle failed * bump * bump * bump * remove space * Upgrade Rise adapter to 5.0 * added isWrapper param * addes is_wrapper parameter to documentation * added is_wrapper to test * removed isWrapper * Rise Bid Adapter: support Coppa param (#24) * MinuteMedia Bid Adapter: support Coppa param (#25) * Revert "MinuteMedia Bid Adapter: support Coppa param (#25)" (#26) This reverts commit 66c4e7b. * bump * update coppa fetch * setting coppa param update * update Coppa tests * update test naming * Rise Bid Adapter: support plcmt and sua (#27) * update minuteMediaBidAdapter - support missing params (#29) * support gpp for minutemedia adapter * removed spaces * removed extra character --------- Co-authored-by: Noam Tzuberi <noam.tzuberi@ironsrc.com> Co-authored-by: noamtzu <noamtzu@gmail.com> Co-authored-by: Noam Tzuberi <noamtzu@users.noreply.github.com> Co-authored-by: Laslo Chechur <laslo.chechur@ironsrc.com> Co-authored-by: OronW <41260031+OronW@users.noreply.github.com> Co-authored-by: lasloche <62240785+lasloche@users.noreply.github.com> Co-authored-by: YakirLavi <73641910+YakirLavi@users.noreply.github.com> Co-authored-by: YakirLavi <yakir.lavi@risecodes.com> Co-authored-by: Inna Yaretsky <>
* create setupadBidAdapter * add setupadBidAdapter * update setupadBidAdapter * update metrics collection * update analytics collection * update getUserSyncs * add setupadAnalyticsAdapter.js * test setupadAnalyticsAdapter * remove test: 1 * add GVLID && bug fixes && test updates * remove setupadAnalyticsAdapter * add userID module handling * add GVLID && bug fixes && test updates * remove setupadAnalyticsAdapter * add userID module handling * clean up && seat bugfix * clean up logs * add userID module handling * update md && clean up * Send setupad only on bidRequested * Fix bidResponse and bidWon responses * Improve bidResponse and bidWon logic * Revert changes to specific files * Remove test parameter * Fix multiple bidResponse and bidTimeout calls to getPixelUrl * eslint errors fixes(brackets added) * Add extra checks for events * Fix BIDDER_CODE const * update reporting endpoint * update setupadBidAdapter_spec.js REPORT_ENDPOINT * update readme * Revert "Merge branch 'prebid:master' into setupad-adapter" This reverts commit 1c14dbe, reversing changes made to 7fe9ea5. * Revert "Revert "Merge branch 'prebid:master' into setupad-adapter"" This reverts commit a34e3e4. * # This is a combination of 20 commits. # This is the 1st commit message: add setupadBidAdapter # This is the commit message #2: update setupadBidAdapter # This is the commit message #3: update metrics collection # This is the commit message #4: update analytics collection # This is the commit message #5: update getUserSyncs # This is the commit message #6: add setupadAnalyticsAdapter.js # This is the commit message #7: test setupadAnalyticsAdapter # This is the commit message #8: remove test: 1 # This is the commit message #9: add GVLID && bug fixes && test updates # This is the commit message #10: remove setupadAnalyticsAdapter # This is the commit message #11: add userID module handling # This is the commit message #12: clean up && seat bugfix # This is the commit message #13: add userID module handling # This is the commit message #14: add GVLID && bug fixes && test updates # This is the commit message #15: remove setupadAnalyticsAdapter # This is the commit message #16: add userID module handling # This is the commit message #17: clean up logs # This is the commit message #18: update md && clean up # This is the commit message #19: Send setupad only on bidRequested # This is the commit message #20: Fix bidResponse and bidWon responses * # This is a combination of 22 commits.tree 8abae7e6dffc9a21ad11770713ba485fc610028a parent cecfce3 author pavel <pavel@setupad.com> 1706627437 +0200 committer pavel <pavel@setupad.com> 1706627437 +0200 gpgsig -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEqGYI3KX/FkbObQG8FABtd4pCs/AFAmW5EW0ACgkQFABtd4pC s/CK3w//WWJSFUlycnnNKTV2XfdcBjooOeZZvjpXVthwr09CCC4uO//kw4bPluhn f5fcVFdXzrY1AZ6ch8Wo3msX/Pkso014jIGd5aIWcHpNYFtffACwH/40Y8AcJNZd bsOZxVK0awPTz/RihC5eY+0J3cP+iFWP/FlYJoHEQIBXq/Eg6mWoAhxwpL/JvxbY QbLFWsRn2ckQ6ftOZgm3/jh8VLaG1zWbWImlWEs5Zel+CorJBTniTj58VbApelYD TFMgbSR2I4NGVaqNIrHePnSMsDATxalQ2nZPwY6raKCHWIbvoUPIn/OpDMMbKgC7 nCwounNmObxFVoj3xusAZppzHpKPasY8xKWb2Kr7zfhZArsOMC6B7fYqQNK0cWG3 8RR/10oheJD9M2kRlfLiqnRv7ExY08SQ/ZMo9LA8BeRUGBXhh6++8FKhKIHvX1gL k1R5W6c+NNWP+PDFsmrFpMn+LpYdl84I7yfYK5dHuw80od7f1wuAVYpswi6Cziy9 /KY6/rfENvUrGTmWSh5GdDBel89ACCfFkasIKB92xhzKTfjzF/DXkc8XQZOMbt1j CsILgWMNfLPMo4Dlgdx/tYCSLLBNEtZ1/hhUcFQ3+0TzLf0GtMkvMnlBnDinqe1n 1P30fQ2I5W5NJKDPrCOnRymI6QOAPFXtMF11R81mbB9H8asft/E= =oJtZ -----END PGP SIGNATURE----- bugfixes # This is the commit message #22: Remove test parameter * # This is a combination of 26 commits. parent cecfce3 author pavel <pavel@setupad.com> 1706627437 +0200 committer pavel <pavel@setupad.com> 1706627437 +0200 gpgsig -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEqGYI3KX/FkbObQG8FABtd4pCs/AFAmW5EW0ACgkQFABtd4pC s/CK3w//WWJSFUlycnnNKTV2XfdcBjooOeZZvjpXVthwr09CCC4uO//kw4bPluhn f5fcVFdXzrY1AZ6ch8Wo3msX/Pkso014jIGd5aIWcHpNYFtffACwH/40Y8AcJNZd bsOZxVK0awPTz/RihC5eY+0J3cP+iFWP/FlYJoHEQIBXq/Eg6mWoAhxwpL/JvxbY QbLFWsRn2ckQ6ftOZgm3/jh8VLaG1zWbWImlWEs5Zel+CorJBTniTj58VbApelYD TFMgbSR2I4NGVaqNIrHePnSMsDATxalQ2nZPwY6raKCHWIbvoUPIn/OpDMMbKgC7 nCwounNmObxFVoj3xusAZppzHpKPasY8xKWb2Kr7zfhZArsOMC6B7fYqQNK0cWG3 8RR/10oheJD9M2kRlfLiqnRv7ExY08SQ/ZMo9LA8BeRUGBXhh6++8FKhKIHvX1gL k1R5W6c+NNWP+PDFsmrFpMn+LpYdl84I7yfYK5dHuw80od7f1wuAVYpswi6Cziy9 /KY6/rfENvUrGTmWSh5GdDBel89ACCfFkasIKB92xhzKTfjzF/DXkc8XQZOMbt1j CsILgWMNfLPMo4Dlgdx/tYCSLLBNEtZ1/hhUcFQ3+0TzLf0GtMkvMnlBnDinqe1n 1P30fQ2I5W5NJKDPrCOnRymI6QOAPFXtMF11R81mbB9H8asft/E= =oJtZ -----END PGP SIGNATURE----- bugfixes # This is the commit message #22: Remove test parameter # This is the commit message #23: Fix multiple bidResponse and bidTimeout calls to getPixelUrl # This is the commit message #25: eslint errors fixes(brackets added) # This is the commit message #26: Add extra checks for events * parent 75178b9 author pavel <pavel@setupad.com> 1706627694 +0200 committer pavel <pavel@setupad.com> 1706627694 +0200 gpgsig -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEqGYI3KX/FkbObQG8FABtd4pCs/AFAmW5Em4ACgkQFABtd4pC s/BBUQ/+NXyHoxPM185YJLG9M1ySC/5vTT9W5mfwQ93cVDLCeuGnpsnmi4S21NuQ b7gSeokFjwztvVOUmh/xqMp4lTsvL53TUd00b1k4KGVSqgcF00Foit5g8fOGLYsI DAoqphYV6MWjpAun+II+ELY8QUkHR1cjTc7PEGtmf+8RnptGVdyJ6C9Ab8u9TQTY Apj5Srhfo3Tl8S+WScOxwwB/uqEJR4fhIrJyzFzdLDEb2olSPyrQUs87vQXlhEnK buPEg2F5JsRH6sw11Xp3TFNSZGxNnBSlTh9dixou5md4yRCv5a2TMef667N0BVDp lGgc7mCrRKXyqzphmmeHudiscEGFjtUPObXoHutSVw22wdARFCTpNFKBLLFn4v8o Zv1OvFdNprvHsoeW0HVlZdU7OKnDTRrko6DHk2AahxojjvAFEWuDsGYZNjhdQwRR lK1zm+SFQnKI0Eojd+f84fvKod9geGs640jyH/x5R4eYm4yjZb8SkRtd3cca88wS OuGq9LIkbU428b46l7VnDwudldTXPUU8eKfUtFRjdGtIWH9I3tK6TsRoCfTcXkv0 smxYiiU1XHjAkkPFWQWEeFdfZ071snFKVWouU0AoKiq+PdRoS8+3AJqIQUjlA2sH AybnSkv9KxY/Rs1bnvMubsQm1GF66qVrbxBU6FILBv1JZYwj4yA= =Gbog -----END PGP SIGNATURE----- bugfixes update setupadBidAdapter_spec.js REPORT_ENDPOINT update readme Revert "Merge branch 'prebid:master' into setupad-adapter" This reverts commit 1c14dbe, reversing changes made to 7fe9ea5. Revert "Revert "Merge branch 'prebid:master' into setupad-adapter"" This reverts commit a34e3e4. * change double quote to single quote --------- Co-authored-by: pavel <pavel@setupad.com> Co-authored-by: Elgars Grodnis <elgars@setupad.com> * bugfix setupadBidAdapter remove getAdEl, spelling correction * add onBidWon event onBidWon event handling moved from custom to native onBidWon method * minor bugfixes && remove funk getSiteObj && getDeviceObj --------- Co-authored-by: pavel <pavel@setupad.com> Co-authored-by: Elgars Grodnis <elgars@setupad.com>
Schain Info is added as follows:
bidRequests
(the object that prebid passes to adapter during bid request phased to build and send requests) then try to infer schainsource
field.source
to null