(Fix) - #1605 QR Input address fix#1612
Conversation
|
CLA Assistant Lite All Contributors have signed the CLA. |
ESLint Summary View Full Report
[warning] @typescript-eslint/explicit-module-boundary-types
Report generated by eslint-plus-action |
|
Travis automatic deployment: |
|
Travis automatic deployment: |
|
Travis automatic deployment: |
|
Travis automatic deployment: |
Fixes popping up again for wrong qr codes
|
Travis automatic deployment: |
|
Travis automatic deployment: |
1 similar comment
|
Travis automatic deployment: |
|
Travis automatic deployment: |
I tested it and seems that the problem is that the qr scanner cannot read the qr but instead of throwing an error it just open the modal again, I added an error text for those cases and remove the auto poping: |
|
Travis automatic deployment: |
|
Travis automatic deployment: |
| openImageDialog() | ||
| } | ||
| }, [hasWebcam, openImageDialog]) | ||
| }, [useWebcam, openImageDialog, fileUploadModalOpen, setFileUploadModalOpen, error]) |
There was a problem hiding this comment.
I think this is not needed in dependencies setFileUploadModalOpen. But not sure.
There was a problem hiding this comment.
It's not 100% needed but it's a bad react practice not adding all the things used on the useEffect
| console.error('Error uploading file', error) | ||
| setError(`The QR could not be read`) | ||
| } | ||
| if (!useWebcam) { |
There was a problem hiding this comment.
is this validation needed? seems like if useWebcam is null or false, it will never reach this line.
There was a problem hiding this comment.
Yes because if it's false means that the user opened the modal for uploading the file and if that line was reached that means that there was not an error but the qr could not be readed (it returns null or successData) and we need to display a feedback in that case
nicosampler
left a comment
There was a problem hiding this comment.
LGTM.
I just left a few comments!
|
Travis automatic deployment: |
|
Travis automatic deployment: |
|
The recipient field not being filled with the contract's address was fixed It looks good to me |
|
Travis automatic deployment: |
|
Travis automatic deployment: |
|
Travis automatic deployment: |
|
Travis automatic deployment: |


Closes #1605
Closes #1196 by:
useEffecthook was being used for opening/closing the modal