Unpin coordinator deps.
Update coordinator tests for new tooling. Remove unecessary `chainId` parameter in `eip712_utils.createCoordinatorApprovalTypeData`
This commit is contained in:
committed by
Amir Bandeali
parent
e6aff19a0c
commit
e51b425200
@@ -74,7 +74,6 @@ describe('Libs tests', () => {
|
|||||||
const expectedApprovalHash = hashUtils.getApprovalHashHex(
|
const expectedApprovalHash = hashUtils.getApprovalHashHex(
|
||||||
signedTx,
|
signedTx,
|
||||||
coordinatorContract.address,
|
coordinatorContract.address,
|
||||||
chainId,
|
|
||||||
txOrigin,
|
txOrigin,
|
||||||
approvalExpirationTimeSeconds,
|
approvalExpirationTimeSeconds,
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -8,12 +8,10 @@ import { hashUtils, SignedCoordinatorApproval } from './index';
|
|||||||
export class ApprovalFactory {
|
export class ApprovalFactory {
|
||||||
private readonly _privateKey: Buffer;
|
private readonly _privateKey: Buffer;
|
||||||
private readonly _verifyingContractAddress: string;
|
private readonly _verifyingContractAddress: string;
|
||||||
private readonly _chainId: number;
|
|
||||||
|
|
||||||
constructor(privateKey: Buffer, verifyingContractAddress: string, chainId: number) {
|
constructor(privateKey: Buffer, verifyingContractAddress: string, chainId: number) {
|
||||||
this._privateKey = privateKey;
|
this._privateKey = privateKey;
|
||||||
this._verifyingContractAddress = verifyingContractAddress;
|
this._verifyingContractAddress = verifyingContractAddress;
|
||||||
this._chainId = chainId;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public newSignedApproval(
|
public newSignedApproval(
|
||||||
@@ -25,7 +23,6 @@ export class ApprovalFactory {
|
|||||||
const approvalHashBuff = hashUtils.getApprovalHashBuffer(
|
const approvalHashBuff = hashUtils.getApprovalHashBuffer(
|
||||||
transaction,
|
transaction,
|
||||||
this._verifyingContractAddress,
|
this._verifyingContractAddress,
|
||||||
this._chainId,
|
|
||||||
txOrigin,
|
txOrigin,
|
||||||
approvalExpirationTimeSeconds,
|
approvalExpirationTimeSeconds,
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -113,6 +113,7 @@ export const eip712Utils = {
|
|||||||
name: constants.COORDINATOR_DOMAIN_NAME,
|
name: constants.COORDINATOR_DOMAIN_NAME,
|
||||||
version: constants.COORDINATOR_DOMAIN_VERSION,
|
version: constants.COORDINATOR_DOMAIN_VERSION,
|
||||||
verifyingContractAddress,
|
verifyingContractAddress,
|
||||||
|
chainId: transaction.chainId,
|
||||||
};
|
};
|
||||||
const transactionHash = transactionHashUtils.getTransactionHashHex(transaction);
|
const transactionHash = transactionHashUtils.getTransactionHashHex(transaction);
|
||||||
const approval = {
|
const approval = {
|
||||||
|
|||||||
Reference in New Issue
Block a user