Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

KYC wording & Image upload fix to 9.9MB +/- #981

Merged
merged 7 commits into from Oct 20, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion server/tools/nginx/proxy.conf
Expand Up @@ -3,7 +3,7 @@ proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Real-Origin $http_origin;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
client_max_body_size 10m;
client_max_body_size 20m;
client_body_buffer_size 128k;
proxy_connect_timeout 90;
proxy_send_timeout 90;
Expand Down
2 changes: 1 addition & 1 deletion templates/local/nginx/proxy.conf
Expand Up @@ -3,7 +3,7 @@ proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Real-Origin $http_origin;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
client_max_body_size 10m;
client_max_body_size 20m;
client_body_buffer_size 128k;
proxy_connect_timeout 90;
proxy_send_timeout 90;
Expand Down
30 changes: 15 additions & 15 deletions web/src/config/lang/en.js
Expand Up @@ -523,10 +523,10 @@ export default {
ISSUED_DATE: 'Please select the date in which your document was issued',
EXPIRATION_DATE:
'Please select the date when your document will expire',
FRONT: 'Please upload a scan of your passport',
FRONT: 'Please upload a scan of your passport or national Id',
PROOF_OF_RESIDENCY:
'Please upload a scan of document proving the address you current reside',
SELFIE_PHOTO_ID: 'Please upload a selfie with passport and note',
SELFIE_PHOTO_ID: 'Please upload a selfie with passport or national Id and note',
},
FORM_FIELDS: {
TYPE_LABEL: 'ID Document Type',
Expand All @@ -535,32 +535,32 @@ export default {
ID: 'ID',
PASSPORT: 'Passport',
},
ID_NUMBER_LABEL: 'Passport Number',
ID_NUMBER_PLACEHOLDER: 'Type your passport number',
ID_PASSPORT_NUMBER_LABEL: 'Passport Number',
ID_PASSPORT_NUMBER_PLACEHOLDER: 'Type your passport number',
ISSUED_DATE_LABEL: 'Passport Issue Date',
EXPIRATION_DATE_LABEL: 'Passport Expiration Date',
FRONT_LABEL: 'Passport',
FRONT_PLACEHOLDER: 'Add a copy of your passport',
BACK_LABEL: 'Back Side of passport',
ID_NUMBER_LABEL: 'Passport Number or National Id Number',
ID_NUMBER_PLACEHOLDER: 'Type your passport Number or national Id number',
ID_PASSPORT_NUMBER_LABEL: 'Passport Number or national id number',
ID_PASSPORT_NUMBER_PLACEHOLDER: 'Tyype your passport or national Id number',
ultra-pool marked this conversation as resolved.
Show resolved Hide resolved
ISSUED_DATE_LABEL: 'Passport or National Id Issue Date',
EXPIRATION_DATE_LABEL: 'Passport or National ID Expiration Date',
FRONT_LABEL: 'Passport or National Id',
FRONT_PLACEHOLDER: 'Add a copy of your passport or national id',
BACK_LABEL: 'Back Side of passport or national id',
BACK_PLACEHOLDER:
'Add a copy of the backside of your ID (if applicable)',
PASSPORT_LABEL: 'Passport Document',
PASSPORT_LABEL: 'Passport or National ID Document',
PASSPORT_PLACEHOLDER: 'Add a copy of your Passport document',
POR_LABEL: 'Document proving your address',
POR_PLACEHOLDER: 'Add a copy of a document that proves your address',
SELFIE_PHOTO_ID_LABEL: 'Your Selfie with passport and Note',
SELFIE_PHOTO_ID_LABEL: 'Your Selfie with passport or national Id and Note',
SELFIE_PHOTO_ID_PLACEHOLDER:
'Add a copy of your Selfie with passport and Note',
'Add a copy of your Selfie with passport or national Id and Note',
},
INFORMATION: {
IDENTITY_DOCUMENT: 'Identity Document',
PROOF_OF_RESIDENCY: 'Proof of residence',
ID_SECTION: {
TITLE: 'Please make sure that your submitted documents are:',
LIST_ITEM_1:
'HIGH QUALITY (colour images, 300dpi resolution or higher).',
'HIGH QUALITY (color images, 300dpi resolution or higher and Image must be 2MB in size per image or lower) Use a Webtool to resize.',
LIST_ITEM_2: 'VISIBLE IN THEIR ENTIRETY (watermarks are permitted).',
LIST_ITEM_3: 'VALID, with the expiry date clearly visible.',
WARNING_1:
Expand Down
4 changes: 2 additions & 2 deletions web/src/utils/icon.js
Expand Up @@ -124,11 +124,11 @@ export const getAllIconsArray = (themeKeys, content = defaultIcons) => {
return allIcons;
};

const sizeLimitInMB = 2;
const sizeLimitInMB = 10;

export const checkFileSize = (file) => {
if (file && file.size) {
const sizeLimit = sizeLimitInMB * 1024 * 1024;
const sizeLimit = sizeLimitInMB * 1024 * 1024 * 1024 * 1024 * 1024 * 1024 * 1024 * 1024 * 1024 * 1024;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead use Math.pow

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not understand as this is not for a coin currency using a a lot of zeros. Please send a example or please edit the code ion the PR so i see what you are referring to.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

its got a repeated multiplication. Cleaner to use power function instead.

return file.size < sizeLimit;
}
};
Expand Down