Update tooling/types to incorporate chainID in domain separators.
This commit is contained in:
committed by
Amir Bandeali
parent
964d8171dd
commit
4bbaa6b41c
@@ -100,12 +100,13 @@ export const constants = {
|
||||
INFINITE_TIMESTAMP_SEC: new BigNumber(2524604400), // Close to infinite
|
||||
ZERO_AMOUNT: new BigNumber(0),
|
||||
EXCHANGE_DOMAIN_NAME: '0x Protocol',
|
||||
EXCHANGE_DOMAIN_VERSION: '2',
|
||||
EXCHANGE_DOMAIN_VERSION: '3.0.0',
|
||||
DEFAULT_DOMAIN_SCHEMA: {
|
||||
name: 'EIP712Domain',
|
||||
parameters: [
|
||||
{ name: 'name', type: 'string' },
|
||||
{ name: 'version', type: 'string' },
|
||||
{ name: 'chainId', type: 'uint256' },
|
||||
{ name: 'verifyingContract', type: 'address' },
|
||||
],
|
||||
},
|
||||
|
||||
@@ -40,6 +40,7 @@ export const eip712Utils = {
|
||||
domain: {
|
||||
name: domain.name === undefined ? constants.EXCHANGE_DOMAIN_NAME : domain.name,
|
||||
version: domain.version === undefined ? constants.EXCHANGE_DOMAIN_VERSION : domain.version,
|
||||
chainId: domain.chainId,
|
||||
verifyingContract: domain.verifyingContractAddress,
|
||||
},
|
||||
message,
|
||||
|
||||
@@ -782,5 +782,6 @@ export interface PackageJSON {
|
||||
export interface EIP712DomainWithDefaultSchema {
|
||||
name?: string;
|
||||
version?: string;
|
||||
chainId: number;
|
||||
verifyingContractAddress: string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user