aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2017-08-15 08:32:41 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2017-08-15 08:32:41 +0800
commit9099ef4ee554a44f46d9de128333b7ad231fa61a (patch)
tree20b64fbd8c12fcb7da30be0478d579914a081704
parentc4dfda9485a091b6867db4342b9620330058b0ad (diff)
downloaddexon-sol-tools-9099ef4ee554a44f46d9de128333b7ad231fa61a.tar
dexon-sol-tools-9099ef4ee554a44f46d9de128333b7ad231fa61a.tar.gz
dexon-sol-tools-9099ef4ee554a44f46d9de128333b7ad231fa61a.tar.bz2
dexon-sol-tools-9099ef4ee554a44f46d9de128333b7ad231fa61a.tar.lz
dexon-sol-tools-9099ef4ee554a44f46d9de128333b7ad231fa61a.tar.xz
dexon-sol-tools-9099ef4ee554a44f46d9de128333b7ad231fa61a.tar.zst
dexon-sol-tools-9099ef4ee554a44f46d9de128333b7ad231fa61a.zip
Remove url from token registry
-rw-r--r--src/contract_wrappers/token_registry_wrapper.ts3
-rw-r--r--src/schemas/token_schema.ts13
-rw-r--r--src/types.ts5
-rw-r--r--test/schema_test.ts4
4 files changed, 4 insertions, 21 deletions
diff --git a/src/contract_wrappers/token_registry_wrapper.ts b/src/contract_wrappers/token_registry_wrapper.ts
index d15e5c4f7..eaaea150d 100644
--- a/src/contract_wrappers/token_registry_wrapper.ts
+++ b/src/contract_wrappers/token_registry_wrapper.ts
@@ -30,8 +30,7 @@ export class TokenRegistryWrapper extends ContractWrapper {
address: metadata[0],
name: metadata[1],
symbol: metadata[2],
- url: metadata[3],
- decimals: metadata[4].toNumber(),
+ decimals: metadata[3].toNumber(),
};
});
return tokens;
diff --git a/src/schemas/token_schema.ts b/src/schemas/token_schema.ts
index 1236e07c1..e9e359fdf 100644
--- a/src/schemas/token_schema.ts
+++ b/src/schemas/token_schema.ts
@@ -5,18 +5,7 @@ export const tokenSchema = {
symbol: {type: 'string'},
decimals: {type: 'number'},
address: {$ref: '/addressSchema'},
- url: {
- oneOf: [
- {
- type: 'string',
- format: 'uri',
- },
- {
- enum: [''],
- },
- ],
- },
},
- required: ['name', 'symbol', 'decimals', 'address', 'url'],
+ required: ['name', 'symbol', 'decimals', 'address'],
type: 'object',
};
diff --git a/src/types.ts b/src/types.ts
index bed00a006..9b22351bd 100644
--- a/src/types.ts
+++ b/src/types.ts
@@ -275,15 +275,14 @@ export interface SignedOrder extends Order {
ecSignature: ECSignature;
}
-// [address, name, symbol, projectUrl, decimals, ipfsHash, swarmHash]
-export type TokenMetadata = [string, string, string, string, BigNumber.BigNumber, string, string];
+// [address, name, symbol, decimals, ipfsHash, swarmHash]
+export type TokenMetadata = [string, string, string, BigNumber.BigNumber, string, string];
export interface Token {
name: string;
address: string;
symbol: string;
decimals: number;
- url: string;
}
export interface TxOpts {
diff --git a/test/schema_test.ts b/test/schema_test.ts
index c170bebb1..1fac2b380 100644
--- a/test/schema_test.ts
+++ b/test/schema_test.ts
@@ -180,10 +180,6 @@ describe('Schema', () => {
},
[],
4,
- {
- ...token,
- url: 'not an url',
- },
];
const shouldFail = true;
validateAgainstSchema(testCases, tokenSchema, shouldFail);