Skip to content

Commit

Permalink
remove verifyingContract from domain
Browse files Browse the repository at this point in the history
  • Loading branch information
pscott committed Jul 4, 2024
1 parent 4c0b06f commit f59cbd2
Showing 1 changed file with 5 additions and 24 deletions.
29 changes: 5 additions & 24 deletions packages/sx.js/src/clients/starknet/starknet-sig/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,17 +55,10 @@ export class StarknetSig {
| StarknetEIP712ProposeMessage
| StarknetEIP712UpdateProposalMessage
| StarknetEIP712VoteMessage
>(
signer: Account,
verifyingContract: string,
message: T,
types: any,
primaryType: string
): Promise<SignatureData> {
>(signer: Account, message: T, types: any, primaryType: string): Promise<SignatureData> {
const domain = {
...baseDomain,
chainId: this.config.networkConfig.eip712ChainId,
verifyingContract
chainId: this.config.networkConfig.eip712ChainId
};

const data: typedData.TypedData = {
Expand Down Expand Up @@ -120,13 +113,7 @@ export class StarknetSig {
salt: this.generateSalt()
};

const signatureData = await this.sign(
signer,
data.authenticator,
message,
proposeTypes,
'Propose'
);
const signatureData = await this.sign(signer, message, proposeTypes, 'Propose');

return {
signatureData,
Expand Down Expand Up @@ -157,13 +144,7 @@ export class StarknetSig {
salt: this.generateSalt()
};

const signatureData = await this.sign(
signer,
data.authenticator,
message,
updateProposalTypes,
'UpdateProposal'
);
const signatureData = await this.sign(signer, message, updateProposalTypes, 'UpdateProposal');

return {
signatureData,
Expand Down Expand Up @@ -191,7 +172,7 @@ export class StarknetSig {
metadataUri: shortString.splitLongString('').map(str => shortString.encodeShortString(str))
};

const signatureData = await this.sign(signer, data.authenticator, message, voteTypes, 'Vote');
const signatureData = await this.sign(signer, message, voteTypes, 'Vote');

return {
signatureData,
Expand Down

0 comments on commit f59cbd2

Please sign in to comment.