-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
sam
committed
Jan 12, 2021
1 parent
4984e6c
commit 4a02572
Showing
7 changed files
with
28 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
import defaultExport from '@uniswap/token-lists'; | ||
import Ajv from 'ajv'; | ||
import * as data from './tokens.json'; | ||
import defaultExport from "@uniswap/token-lists"; | ||
import Ajv from "ajv"; | ||
import * as data from "./tokens.json"; | ||
|
||
var ajv = new Ajv(); | ||
var valid = ajv.addSchema(defaultExport.schema, 'mySchema') | ||
.validate('mySchema', data.default); | ||
var valid = ajv | ||
.addSchema(defaultExport.schema, "mySchema") | ||
.validate("mySchema", data.default); | ||
if (!valid) { | ||
throw new Error(ajv.errorsText()); | ||
throw new Error(ajv.errorsText()); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters