diff options
Diffstat (limited to 'pw_web/webconsole/components/uploadDb.tsx')
-rw-r--r-- | pw_web/webconsole/components/uploadDb.tsx | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/pw_web/webconsole/components/uploadDb.tsx b/pw_web/webconsole/components/uploadDb.tsx index 11a6ea9a5..3b01fb0bd 100644 --- a/pw_web/webconsole/components/uploadDb.tsx +++ b/pw_web/webconsole/components/uploadDb.tsx @@ -20,16 +20,6 @@ interface Props { onUpload: (db: string) => void } -function testTokenDB(tokenCsv: string) { - const lines = tokenCsv.trim().split(/\r?\n/).map(line => line.split(/,/)); - lines.forEach((line) => { - // CSV has no columns or has malformed number. - if (line.length < 2 || !/^[a-fA-F0-9]+$/.test(line[0])) { - throw new Error("Not a valid token database.") - } - }); -} - export default function BtnUploadDB({onUpload}: Props) { const [uploaded, setUploaded] = useState(false); const [error, setError] = useState(""); @@ -46,7 +36,6 @@ export default function BtnUploadDB({onUpload}: Props) { onChange={async e => { const tokenCsv = await readFile(e.target.files![0]); try { - testTokenDB(tokenCsv); onUpload(tokenCsv); setUploaded(true); setError(""); |