4 ms·
I came to the comments solely to see if anyone found secret codes. Edit: Found the key sequence handling code addToKeySequence(t) { if (this.keySeq
by J5892 5y ago
I came to the comments solely to see if anyone found secret codes.
Edit:
Found the key sequence handling code
addToKeySequence(t) {
if (this.keySequence.push(t),
this.insertCardScreen.createShowDotsAnimation(this.keySequence.length).play(),
this.keySequence.length < 4)
this.insertCardScreen.createHideLogosAnimation().play();
else {
switch (this.keySequence.join("")) {
case "1337":
this.handleWpp();
break;
case "4242":
this.handleInsertCard();
break;
default:
this.handleInvalidCode()
}
this.keySequence.length = 0
}
}
- smaddock 5y agoFor those not in the know, 4242 is used as a common test card number. https://stripe.com/docs/testing#cards https://stripe.com/docs/testing#cards
- cdmckay 5y agoI believe it comes from Hitchhiker's Guide to the Galaxy
- OisinMoran 5y agoNot entirely sure on the actual origins of this specific number but I think a crucial piece is that it passes the Luhn algorithm check [0] that is used to validate card numbers (and in generation of them to make single digit errors not result in another valid card number). 42 itself also passes the test but card numbers usually come in blocks of 4 digits so 4242 probably seems more card-like. As to where the 42 from the Guide came from, I would recommend consulting The Hunting of the Snark. [0] https://en.m.wikipedia.org/wiki/Luhn_algorithm https://en.m.wikipedia.org/wiki/Luhn_algorithm