Skip to content

Commit

Permalink
fix(hapi): minor control comments (#391)
Browse files Browse the repository at this point in the history
  • Loading branch information
leisterfrancisco committed Feb 16, 2022
1 parent 83d307b commit 66904b5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion hapi/src/services/join-request.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ const update = async (account, payload) => {
}

// This function is intended to make a soft database update to replace state value for status
// WARNING: Removed after a production version of this function
// WARNING: Remove after this version is deployed in production
const updateStatus = async () => {
const requesters = await findByStatus(JOIN_REQUEST_STATUS_IDS.PENDING_KYC)
const { rows } = await eosUtil.getTableRows({
Expand Down Expand Up @@ -134,6 +134,7 @@ const updateRequester = async () => {

for (const requester of requesters) {
const daysAfterJoin = moment().diff(moment(requester.created_at), 'days')
// Take kyc from db after this version is deployed to production
const hasKYC = await affiliateService.checkKyc(requester.account)

if (!daysAfterJoin || hasKYC) continue
Expand Down
2 changes: 1 addition & 1 deletion webapp/src/language/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"success": "request sent successfully",
"emailHelperText": "Valid e-mail!",
"emailHelperError": "Invalid e-mail format!",
"referralNotFound": "No referral found for {{ invitee }} or awaiting admin approval , please contact an Admin",
"referralNotFound": "No referral found for {{ invitee }} or awaiting admin approval, please contact an Admin",
"searchTitle": "Check Your Invitation Status",
"protonAccount": "Proton Account"
},
Expand Down
2 changes: 2 additions & 0 deletions webapp/src/routes/Home/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ const Home = () => {
isValid: false,
message: t('accountHelperError2')
})
setAccountStatus(affiliateUtil.JOIN_REQUEST_STATUS_IDS.PENDING_APPROVAL)
} catch (error) {
showMessage({ type: 'error', content: error.message })
}
Expand Down Expand Up @@ -231,6 +232,7 @@ const Home = () => {
if (account) {
validateAccount()
} else {
setAccountStatus(affiliateUtil.JOIN_REQUEST_STATUS_IDS.NONE)
setIsValidAccount({
showHelper: false,
message: '',
Expand Down

0 comments on commit 66904b5

Please sign in to comment.