From 53ddd2cdfb8bf77aeacf0efd0cbc6b08a8acc120 Mon Sep 17 00:00:00 2001 From: Antonio Morrone Date: Tue, 28 Jun 2022 19:11:32 +0000 Subject: [PATCH] PP-137: Unnecessary domain separator (#19) * Eliminates the use of the domainSeparator as part of the relayData * Delete commented code related to the task of eliminating the domain separator * Update the dist folder Co-authored-by: Andres Quijano --- src/Enveloping.ts | 13 ++----------- src/RelayClient.ts | 15 +-------------- 2 files changed, 3 insertions(+), 25 deletions(-) diff --git a/src/Enveloping.ts b/src/Enveloping.ts index 27f86d2..6f7f79e 100644 --- a/src/Enveloping.ts +++ b/src/Enveloping.ts @@ -7,7 +7,6 @@ import { RelayTransactionRequest, constants, EnvelopingConfig, - getDomainSeparatorHash, TypedDeployRequestData, TypedRequestData } from '@rsksmart/rif-relay-common'; @@ -111,11 +110,7 @@ export default class Enveloping { gasPrice: gasPrice ?? (await web3.eth.getGasPrice()), relayWorker: this.relayWorkerAddress, callForwarder: this.config.smartWalletFactoryAddress, - callVerifier: this.config.deployVerifierAddress, - domainSeparator: getDomainSeparatorHash( - this.config.smartWalletFactoryAddress, - this.config.chainId - ) + callVerifier: this.config.deployVerifierAddress } }; @@ -207,11 +202,7 @@ export default class Enveloping { gasPrice: gasPriceToSend, relayWorker: this.relayWorkerAddress, callForwarder: forwarder, - callVerifier: this.config.relayVerifierAddress, - domainSeparator: getDomainSeparatorHash( - forwarder, - this.config.chainId - ) + callVerifier: this.config.relayVerifierAddress } }; diff --git a/src/RelayClient.ts b/src/RelayClient.ts index 83cf420..5c9602f 100644 --- a/src/RelayClient.ts +++ b/src/RelayClient.ts @@ -14,8 +14,7 @@ import { EnvelopingConfig, decodeRevertReason, calculateDeployTransactionMaxPossibleGas, - estimateMaxPossibleRelayCallWithLinearFit, - getDomainSeparatorHash + estimateMaxPossibleRelayCallWithLinearFit } from '@rsksmart/rif-relay-common'; import { Address, PingFilter } from './types/Aliases'; import HttpClient from './HttpClient'; @@ -423,10 +422,6 @@ export class RelayClient { gasPrice, callVerifier: transactionDetails.callVerifier ?? constants.ZERO_ADDRESS, - domainSeparator: getDomainSeparatorHash( - callForwarder, - this.accountManager.chainId - ), callForwarder: callForwarder, relayWorker: relayWorker } @@ -799,10 +794,6 @@ export class RelayClient { relayData: { gasPrice, callVerifier, - domainSeparator: getDomainSeparatorHash( - forwarderAddress, - this.accountManager.chainId - ), callForwarder: forwarderAddress, relayWorker } @@ -875,10 +866,6 @@ export class RelayClient { relayData: { gasPrice, callVerifier, - domainSeparator: getDomainSeparatorHash( - forwarderAddress, - this.accountManager.chainId - ), callForwarder: forwarderAddress, relayWorker }