From 024fb7bb2f3cecebcbc19224e6a47c09a4da44a8 Mon Sep 17 00:00:00 2001 From: Franck Chastagnol Date: Thu, 18 Apr 2019 20:06:38 -1000 Subject: [PATCH] Case insensitive code and gate phone attestation --- infra/faucet/src/eth.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/infra/faucet/src/eth.js b/infra/faucet/src/eth.js index 3c910d5211b5..3853efc93831 100644 --- a/infra/faucet/src/eth.js +++ b/infra/faucet/src/eth.js @@ -281,7 +281,7 @@ class EthDistributor { const now = new Date() const campaign = await db.FaucetCampaign.findOne({ where: { - inviteCode: code, + inviteCode: code.toLowerCase(), startDate: { [Sequelize.Op.lt]: now }, endDate: { [Sequelize.Op.gt]: now } } @@ -342,7 +342,10 @@ class EthDistributor { method: 'PHONE' } }) - if (!phoneAttestation) { + if ( + process.env.REQUIRE_PHONE_ATTESTATION === 'true' && + !phoneAttestation + ) { return this._error( res, `Please verify your phone number on the DApp profile page before using the ETH faucet.`