Skip to content

Commit

Permalink
Fixed signature issues between ens and uniswap (#739)
Browse files Browse the repository at this point in the history
  • Loading branch information
andreitr authored Jan 17, 2025
1 parent ce8d9dd commit 14582bf
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/hooks/useSponsoredDelegation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export const useSponsoredDelegation = ({ address, delegate }: Props) => {

const signature = await signTypedDataAsync({
domain: {
...gasRelayConfig,
...gasRelayConfig.signature,
name,
chainId: contracts.token.chain.id,
verifyingContract: contracts.token.address as Address,
Expand Down
1 change: 1 addition & 0 deletions src/hooks/useSponsoredVoting.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ const useSponsoredVoting = ({
try {
const signature = await signTypedDataAsync({
domain: {
...gasRelayConfig.signature,
name,
chainId: contracts.governor.chain.id,
verifyingContract: contracts.governor.address as `0x${string}`,
Expand Down
8 changes: 6 additions & 2 deletions src/lib/tenant/configs/ui/ens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,9 @@ export const ensTenantUIConfig = new TenantUI({
name: "sponsoredVote",
enabled: true,
config: {
version: "1",
signature: {
version: "1",
},
sponsorAddress:
process.env.NEXT_PUBLIC_AGORA_ENV === "prod"
? "0x7735C385081568e9338aEc70492Debfd2d5c3450"
Expand All @@ -116,7 +118,9 @@ export const ensTenantUIConfig = new TenantUI({
name: "sponsoredDelegate",
enabled: true,
config: {
version: "1",
signature: {
version: "1",
},
sponsorAddress:
process.env.NEXT_PUBLIC_AGORA_ENV === "prod"
? "0x7735C385081568e9338aEc70492Debfd2d5c3450"
Expand Down
2 changes: 0 additions & 2 deletions src/lib/tenant/configs/ui/uniswap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,6 @@ export const uniswapTenantUIConfig = new TenantUI({
name: "sponsoredVote",
enabled: true,
config: {
version: "1",
sponsorAddress:
process.env.NEXT_PUBLIC_AGORA_ENV === "prod"
? "0xc1B333d56Af681F4Db3194F8Dc6cEdF860a8c950"
Expand All @@ -247,7 +246,6 @@ export const uniswapTenantUIConfig = new TenantUI({
name: "sponsoredDelegate",
enabled: true,
config: {
version: "1",
sponsorAddress:
process.env.NEXT_PUBLIC_AGORA_ENV === "prod"
? "0xc1B333d56Af681F4Db3194F8Dc6cEdF860a8c950"
Expand Down
4 changes: 3 additions & 1 deletion src/lib/tenant/tenantUI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ export type UIEndorsedConfig = {
};

export type UIGasRelayConfig = {
version?: string;
signature?: {
version?: string;
};
minBalance: string;
sponsorAddress: `0x${string}`;
};
Expand Down

0 comments on commit 14582bf

Please sign in to comment.