Forked react-qr-reader to add react 18 support

This commit is contained in:
Willian Mitsuda 2022-08-06 19:18:09 -03:00
parent 136220f791
commit 2acadc7d00
3 changed files with 38 additions and 32 deletions

64
package-lock.json generated
View File

@ -9,7 +9,6 @@
"version": "0.1.0", "version": "0.1.0",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@blackbox-vision/react-qr-reader": "^5.0.0",
"@chainlink/contracts": "^0.4.2", "@chainlink/contracts": "^0.4.2",
"@fontsource/fira-code": "^4.5.10", "@fontsource/fira-code": "^4.5.10",
"@fontsource/roboto": "^4.5.7", "@fontsource/roboto": "^4.5.7",
@ -21,6 +20,7 @@
"@fortawesome/free-solid-svg-icons": "^6.1.2", "@fortawesome/free-solid-svg-icons": "^6.1.2",
"@fortawesome/react-fontawesome": "^0.2.0", "@fortawesome/react-fontawesome": "^0.2.0",
"@headlessui/react": "^1.6.6", "@headlessui/react": "^1.6.6",
"@otterscan/react-qr-reader": "^5.2.0",
"@testing-library/jest-dom": "^5.16.4", "@testing-library/jest-dom": "^5.16.4",
"@testing-library/react": "^11.1.0", "@testing-library/react": "^11.1.0",
"@testing-library/user-event": "^12.1.10", "@testing-library/user-event": "^12.1.10",
@ -554,19 +554,6 @@
"node": ">=6.9.0" "node": ">=6.9.0"
} }
}, },
"node_modules/@blackbox-vision/react-qr-reader": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/@blackbox-vision/react-qr-reader/-/react-qr-reader-5.0.0.tgz",
"integrity": "sha512-VLNKwwJTv4UX1inUNgt2aGC2yIhKBYptW9EOhn7Nq//WzjD5KvHG7WR48HTzGUZ2s/EA0XlxZSfKOarHV1Vb/A==",
"dependencies": {
"@zxing/browser": "0.0.7",
"@zxing/library": "^0.18.3"
},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0",
"react-dom": "^16.8.0 || ^17.0.0"
}
},
"node_modules/@chainlink/contracts": { "node_modules/@chainlink/contracts": {
"version": "0.4.2", "version": "0.4.2",
"resolved": "https://registry.npmjs.org/@chainlink/contracts/-/contracts-0.4.2.tgz", "resolved": "https://registry.npmjs.org/@chainlink/contracts/-/contracts-0.4.2.tgz",
@ -1511,6 +1498,19 @@
"node": ">= 8" "node": ">= 8"
} }
}, },
"node_modules/@otterscan/react-qr-reader": {
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/@otterscan/react-qr-reader/-/react-qr-reader-5.2.0.tgz",
"integrity": "sha512-5dTK36QEMlsRE925LIO7affrHV0y83/tuj8u8x3gG6nlGp28kGCJk1VMM+ub44Ev3k6/gpcwpxaRmGGDnNZAyw==",
"dependencies": {
"@zxing/browser": "0.0.7",
"@zxing/library": "^0.18.3"
},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
}
},
"node_modules/@testing-library/dom": { "node_modules/@testing-library/dom": {
"version": "7.31.2", "version": "7.31.2",
"license": "MIT", "license": "MIT",
@ -5397,15 +5397,6 @@
"to-fast-properties": "^2.0.0" "to-fast-properties": "^2.0.0"
} }
}, },
"@blackbox-vision/react-qr-reader": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/@blackbox-vision/react-qr-reader/-/react-qr-reader-5.0.0.tgz",
"integrity": "sha512-VLNKwwJTv4UX1inUNgt2aGC2yIhKBYptW9EOhn7Nq//WzjD5KvHG7WR48HTzGUZ2s/EA0XlxZSfKOarHV1Vb/A==",
"requires": {
"@zxing/browser": "0.0.7",
"@zxing/library": "^0.18.3"
}
},
"@chainlink/contracts": { "@chainlink/contracts": {
"version": "0.4.2", "version": "0.4.2",
"resolved": "https://registry.npmjs.org/@chainlink/contracts/-/contracts-0.4.2.tgz", "resolved": "https://registry.npmjs.org/@chainlink/contracts/-/contracts-0.4.2.tgz",
@ -5688,7 +5679,8 @@
"ws": { "ws": {
"version": "7.4.6", "version": "7.4.6",
"resolved": "https://registry.npmjs.org/ws/-/ws-7.4.6.tgz", "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.6.tgz",
"integrity": "sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==" "integrity": "sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==",
"requires": {}
} }
} }
}, },
@ -5903,7 +5895,8 @@
"@headlessui/react": { "@headlessui/react": {
"version": "1.6.6", "version": "1.6.6",
"resolved": "https://registry.npmjs.org/@headlessui/react/-/react-1.6.6.tgz", "resolved": "https://registry.npmjs.org/@headlessui/react/-/react-1.6.6.tgz",
"integrity": "sha512-MFJtmj9Xh/hhBMhLccGbBoSk+sk61BlP6sJe4uQcVMtXZhCgGqd2GyIQzzmsdPdTEWGSF434CBi8mnhR6um46Q==" "integrity": "sha512-MFJtmj9Xh/hhBMhLccGbBoSk+sk61BlP6sJe4uQcVMtXZhCgGqd2GyIQzzmsdPdTEWGSF434CBi8mnhR6um46Q==",
"requires": {}
}, },
"@jest/types": { "@jest/types": {
"version": "26.6.2", "version": "26.6.2",
@ -5973,6 +5966,15 @@
"fastq": "^1.6.0" "fastq": "^1.6.0"
} }
}, },
"@otterscan/react-qr-reader": {
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/@otterscan/react-qr-reader/-/react-qr-reader-5.2.0.tgz",
"integrity": "sha512-5dTK36QEMlsRE925LIO7affrHV0y83/tuj8u8x3gG6nlGp28kGCJk1VMM+ub44Ev3k6/gpcwpxaRmGGDnNZAyw==",
"requires": {
"@zxing/browser": "0.0.7",
"@zxing/library": "^0.18.3"
}
},
"@testing-library/dom": { "@testing-library/dom": {
"version": "7.31.2", "version": "7.31.2",
"requires": { "requires": {
@ -7657,7 +7659,8 @@
"react-chartjs-2": { "react-chartjs-2": {
"version": "4.3.1", "version": "4.3.1",
"resolved": "https://registry.npmjs.org/react-chartjs-2/-/react-chartjs-2-4.3.1.tgz", "resolved": "https://registry.npmjs.org/react-chartjs-2/-/react-chartjs-2-4.3.1.tgz",
"integrity": "sha512-5i3mjP6tU7QSn0jvb8I4hudTzHJqS8l00ORJnVwI2sYu0ihpj83Lv2YzfxunfxTZkscKvZu2F2w9LkwNBhj6xA==" "integrity": "sha512-5i3mjP6tU7QSn0jvb8I4hudTzHJqS8l00ORJnVwI2sYu0ihpj83Lv2YzfxunfxTZkscKvZu2F2w9LkwNBhj6xA==",
"requires": {}
}, },
"react-dom": { "react-dom": {
"version": "18.2.0", "version": "18.2.0",
@ -7696,7 +7699,8 @@
"react-image": { "react-image": {
"version": "4.0.3", "version": "4.0.3",
"resolved": "https://registry.npmjs.org/react-image/-/react-image-4.0.3.tgz", "resolved": "https://registry.npmjs.org/react-image/-/react-image-4.0.3.tgz",
"integrity": "sha512-19MUK9u1qaw9xys8XEsVkSpVhHctEBUeYFvrLTe1PN+4w5Co13AN2WA7xtBshPM6SthsOj77SlDrEAeOaJpf7g==" "integrity": "sha512-19MUK9u1qaw9xys8XEsVkSpVhHctEBUeYFvrLTe1PN+4w5Co13AN2WA7xtBshPM6SthsOj77SlDrEAeOaJpf7g==",
"requires": {}
}, },
"react-is": { "react-is": {
"version": "17.0.1" "version": "17.0.1"
@ -7989,7 +7993,8 @@
"swr": { "swr": {
"version": "1.3.0", "version": "1.3.0",
"resolved": "https://registry.npmjs.org/swr/-/swr-1.3.0.tgz", "resolved": "https://registry.npmjs.org/swr/-/swr-1.3.0.tgz",
"integrity": "sha512-dkghQrOl2ORX9HYrMDtPa7LTVHJjCTeZoB1dqTbnnEDlSvN8JEKpYIYurDfvbQFUUS8Cg8PceFVZNkW0KNNYPw==" "integrity": "sha512-dkghQrOl2ORX9HYrMDtPa7LTVHJjCTeZoB1dqTbnnEDlSvN8JEKpYIYurDfvbQFUUS8Cg8PceFVZNkW0KNNYPw==",
"requires": {}
}, },
"tailwindcss": { "tailwindcss": {
"version": "npm:@tailwindcss/postcss7-compat@2.2.6", "version": "npm:@tailwindcss/postcss7-compat@2.2.6",
@ -8293,7 +8298,8 @@
"use-keyboard-shortcut": { "use-keyboard-shortcut": {
"version": "1.1.4", "version": "1.1.4",
"resolved": "https://registry.npmjs.org/use-keyboard-shortcut/-/use-keyboard-shortcut-1.1.4.tgz", "resolved": "https://registry.npmjs.org/use-keyboard-shortcut/-/use-keyboard-shortcut-1.1.4.tgz",
"integrity": "sha512-diFzhVWYkoR9WdHGOxp1EWVr2YUaiQC3vdlT1FbdK25UfPcTb3wlVqgSzvEBdrXh0cg1FW3PCBKzNGMGpslMqg==" "integrity": "sha512-diFzhVWYkoR9WdHGOxp1EWVr2YUaiQC3vdlT1FbdK25UfPcTb3wlVqgSzvEBdrXh0cg1FW3PCBKzNGMGpslMqg==",
"requires": {}
}, },
"util-deprecate": { "util-deprecate": {
"version": "1.0.2", "version": "1.0.2",

View File

@ -4,7 +4,6 @@
"private": true, "private": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@blackbox-vision/react-qr-reader": "^5.0.0",
"@chainlink/contracts": "^0.4.2", "@chainlink/contracts": "^0.4.2",
"@fontsource/fira-code": "^4.5.10", "@fontsource/fira-code": "^4.5.10",
"@fontsource/roboto": "^4.5.7", "@fontsource/roboto": "^4.5.7",
@ -16,6 +15,7 @@
"@fortawesome/free-solid-svg-icons": "^6.1.2", "@fortawesome/free-solid-svg-icons": "^6.1.2",
"@fortawesome/react-fontawesome": "^0.2.0", "@fortawesome/react-fontawesome": "^0.2.0",
"@headlessui/react": "^1.6.6", "@headlessui/react": "^1.6.6",
"@otterscan/react-qr-reader": "^5.2.0",
"@testing-library/jest-dom": "^5.16.4", "@testing-library/jest-dom": "^5.16.4",
"@testing-library/react": "^11.1.0", "@testing-library/react": "^11.1.0",
"@testing-library/user-event": "^12.1.10", "@testing-library/user-event": "^12.1.10",

View File

@ -1,8 +1,8 @@
import React from "react"; import React from "react";
import { useNavigate } from "react-router-dom"; import { useNavigate } from "react-router-dom";
import { isAddress } from "@ethersproject/address"; import { isAddress } from "@ethersproject/address";
import { QrReader } from "@blackbox-vision/react-qr-reader"; import { QrReader } from "@otterscan/react-qr-reader";
import { OnResultFunction } from "@blackbox-vision/react-qr-reader/dist-types/types"; import { OnResultFunction } from "@otterscan/react-qr-reader/dist-types/types";
import { BarcodeFormat } from "@zxing/library"; import { BarcodeFormat } from "@zxing/library";
import { Dialog } from "@headlessui/react"; import { Dialog } from "@headlessui/react";