Skip to content

Commit

Permalink
PP-137: Unnecessary domain separator (#19)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
antomor and AndresQuijano authored Jun 28, 2022
1 parent 3126b17 commit 53ddd2c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 25 deletions.
13 changes: 2 additions & 11 deletions src/Enveloping.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import {
RelayTransactionRequest,
constants,
EnvelopingConfig,
getDomainSeparatorHash,
TypedDeployRequestData,
TypedRequestData
} from '@rsksmart/rif-relay-common';
Expand Down Expand Up @@ -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
}
};

Expand Down Expand Up @@ -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
}
};

Expand Down
15 changes: 1 addition & 14 deletions src/RelayClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -423,10 +422,6 @@ export class RelayClient {
gasPrice,
callVerifier:
transactionDetails.callVerifier ?? constants.ZERO_ADDRESS,
domainSeparator: getDomainSeparatorHash(
callForwarder,
this.accountManager.chainId
),
callForwarder: callForwarder,
relayWorker: relayWorker
}
Expand Down Expand Up @@ -799,10 +794,6 @@ export class RelayClient {
relayData: {
gasPrice,
callVerifier,
domainSeparator: getDomainSeparatorHash(
forwarderAddress,
this.accountManager.chainId
),
callForwarder: forwarderAddress,
relayWorker
}
Expand Down Expand Up @@ -875,10 +866,6 @@ export class RelayClient {
relayData: {
gasPrice,
callVerifier,
domainSeparator: getDomainSeparatorHash(
forwarderAddress,
this.accountManager.chainId
),
callForwarder: forwarderAddress,
relayWorker
}
Expand Down

0 comments on commit 53ddd2c

Please sign in to comment.