Address feedback
This commit is contained in:
parent
183e8a7138
commit
3195741ebc
@ -132,8 +132,9 @@ export class ZeroEx {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Converts BigNumber instance to BN
|
* Converts BigNumber instance to BN
|
||||||
* We do it because ethABI accepts only BN's
|
* The only we convert to BN is to remain compatible with `ethABI. soliditySHA3 ` that
|
||||||
* We should be consistent about using BigNumbers in our codebase and not use BN anywhere else
|
* expects values of Solidity type `uint` to be of type `BN`.
|
||||||
|
* We do not use BN anywhere else in the codebase.
|
||||||
*/
|
*/
|
||||||
private static bigNumberToBN(value: BigNumber.BigNumber) {
|
private static bigNumberToBN(value: BigNumber.BigNumber) {
|
||||||
return new BN(value.toString(), 10);
|
return new BN(value.toString(), 10);
|
||||||
|
2
src/ts/globals.d.ts
vendored
2
src/ts/globals.d.ts
vendored
@ -26,5 +26,5 @@ declare module 'ethereumjs-util' {
|
|||||||
}
|
}
|
||||||
|
|
||||||
declare module 'ethereumjs-abi' {
|
declare module 'ethereumjs-abi' {
|
||||||
const soliditySHA3: (argTypes: string[], args: any) => Buffer;
|
const soliditySHA3: (argTypes: string[], args: any[]) => Buffer;
|
||||||
}
|
}
|
||||||
|
@ -13,8 +13,5 @@ function strEnum(values: string[]): {[key: string]: string} {
|
|||||||
export const SolidityTypes = strEnum([
|
export const SolidityTypes = strEnum([
|
||||||
'address',
|
'address',
|
||||||
'uint256',
|
'uint256',
|
||||||
'uint8',
|
|
||||||
'string',
|
|
||||||
'bool',
|
|
||||||
]);
|
]);
|
||||||
export type SolidityTypes = keyof typeof SolidityTypes;
|
export type SolidityTypes = keyof typeof SolidityTypes;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user