aboutsummaryrefslogtreecommitdiffstats
path: root/src/schemas
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2017-05-30 05:52:10 +0800
committerFabio Berger <me@fabioberger.com>2017-05-30 05:52:10 +0800
commitf3d5690d56c3e4c7243f72049c98cfde799413af (patch)
tree1bb9774ecaf0c409690bf16ae86896611027d8a5 /src/schemas
parent919585cd7972bae1667f67c9fa034251f27b14a8 (diff)
downloaddexon-sol-tools-f3d5690d56c3e4c7243f72049c98cfde799413af.tar
dexon-sol-tools-f3d5690d56c3e4c7243f72049c98cfde799413af.tar.gz
dexon-sol-tools-f3d5690d56c3e4c7243f72049c98cfde799413af.tar.bz2
dexon-sol-tools-f3d5690d56c3e4c7243f72049c98cfde799413af.tar.lz
dexon-sol-tools-f3d5690d56c3e4c7243f72049c98cfde799413af.tar.xz
dexon-sol-tools-f3d5690d56c3e4c7243f72049c98cfde799413af.tar.zst
dexon-sol-tools-f3d5690d56c3e4c7243f72049c98cfde799413af.zip
Add tests for getTokensAsync including schema validation
Diffstat (limited to 'src/schemas')
-rw-r--r--src/schemas/token_schema.ts12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/schemas/token_schema.ts b/src/schemas/token_schema.ts
new file mode 100644
index 000000000..01702af68
--- /dev/null
+++ b/src/schemas/token_schema.ts
@@ -0,0 +1,12 @@
+export const tokenSchema = {
+ id: '/token',
+ properties: {
+ name: {type: 'string'},
+ symbol: {type: 'string'},
+ decimals: {type: 'number'},
+ address: {type: 'string'},
+ url: {type: 'string'},
+ },
+ required: ['name', 'symbol', 'decimals', 'address', 'url'],
+ type: 'object',
+};