Skip to content
This repository has been archived by the owner on Sep 20, 2023. It is now read-only.

[Faucet] Make campaign code case insensitive and check on phone attestation conditional #2076

Merged
merged 3 commits into from
Apr 19, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions infra/faucet/src/eth.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
}
Expand Down Expand Up @@ -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.`
Expand Down