Add defaults for networkId and pagination
This commit is contained in:
parent
3b0fa1aa87
commit
dd7e03c7d7
@ -33,7 +33,7 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://github.com/0xProject/0x-monorepo/packages/sra-api/README.md",
|
"homepage": "https://github.com/0xProject/0x-monorepo/packages/sra-api/README.md",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@0xproject/json-schemas": "1.0.1-rc.3"
|
"@0xproject/json-schemas": "^1.0.1-rc.3"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@0xproject/tslint-config": "^1.0.4",
|
"@0xproject/tslint-config": "^1.0.4",
|
||||||
|
File diff suppressed because one or more lines are too long
@ -7,6 +7,7 @@ export const paginationParameters: ParameterObject[] = [
|
|||||||
example: 3,
|
example: 3,
|
||||||
schema: {
|
schema: {
|
||||||
type: 'number',
|
type: 'number',
|
||||||
|
default: 1,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -16,6 +17,7 @@ export const paginationParameters: ParameterObject[] = [
|
|||||||
example: 10,
|
example: 10,
|
||||||
schema: {
|
schema: {
|
||||||
type: 'number',
|
type: 'number',
|
||||||
|
default: 100,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
@ -27,10 +29,11 @@ export const networkdIdParameter: ParameterObject = {
|
|||||||
example: 42,
|
example: 42,
|
||||||
schema: {
|
schema: {
|
||||||
type: 'number',
|
type: 'number',
|
||||||
|
default: 1,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
export const generateParameters = (parameters: ParameterObject[], isPaginated: boolean = false): ParameterObject[] => {
|
export const generateParameters = (parameters: ParameterObject[], isPaginated: boolean = false): ParameterObject[] => {
|
||||||
const optionalParameters = isPaginated ? paginationParameters : [];
|
const optionalParameters = isPaginated ? paginationParameters : [];
|
||||||
return [networkdIdParameter, ...optionalParameters, ...parameters];
|
return [...parameters, networkdIdParameter, ...optionalParameters];
|
||||||
};
|
};
|
||||||
|
@ -5275,9 +5275,9 @@ ethereumjs-wallet@0.6.0:
|
|||||||
utf8 "^2.1.1"
|
utf8 "^2.1.1"
|
||||||
uuid "^2.0.1"
|
uuid "^2.0.1"
|
||||||
|
|
||||||
ethers@0xproject/ethers.js#eip-838-reasons, ethers@3.0.22:
|
ethers@3.0.22:
|
||||||
version "3.0.18"
|
version "3.0.22"
|
||||||
resolved "https://codeload.github.com/0xproject/ethers.js/tar.gz/b91342bd200d142af0165d6befddf783c8ae8447"
|
resolved "https://registry.npmjs.org/ethers/-/ethers-3.0.22.tgz#7fab1ea16521705837aa43c15831877b2716b436"
|
||||||
dependencies:
|
dependencies:
|
||||||
aes-js "3.0.0"
|
aes-js "3.0.0"
|
||||||
bn.js "^4.4.0"
|
bn.js "^4.4.0"
|
||||||
@ -6028,7 +6028,7 @@ ganache-core@0xProject/ganache-core#monorepo-dep:
|
|||||||
ethereumjs-tx "0xProject/ethereumjs-tx#fake-tx-include-signature-by-default"
|
ethereumjs-tx "0xProject/ethereumjs-tx#fake-tx-include-signature-by-default"
|
||||||
ethereumjs-util "^5.2.0"
|
ethereumjs-util "^5.2.0"
|
||||||
ethereumjs-vm "2.3.5"
|
ethereumjs-vm "2.3.5"
|
||||||
ethereumjs-wallet "0.6.0"
|
ethereumjs-wallet "~0.6.0"
|
||||||
fake-merkle-patricia-tree "~1.0.1"
|
fake-merkle-patricia-tree "~1.0.1"
|
||||||
heap "~0.2.6"
|
heap "~0.2.6"
|
||||||
js-scrypt "^0.2.0"
|
js-scrypt "^0.2.0"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user