Skip to content

Commit

Permalink
Merge pull request #433 from picsoritdidnthappen/arbitrum-ban-fix
Browse files Browse the repository at this point in the history
fix: Arbitrum ban issue
  • Loading branch information
picsoritdidnthappen authored Dec 21, 2024
2 parents 4788075 + e198be2 commit bdff144
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/components/bounty/BountyInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ export default function BountyInfo({ bountyId }: { bountyId: string }) {

const signMutation = useMutation({
mutationFn: async (bountyId: string) => {
//arbitrum has a problem with message signing, so all confirmations are on base
const chainId = await account.connector?.getChainId();
if (chainId !== 8453) {
await switctChain.switchChainAsync({ chainId: 8453 });
}

const message =
getBanSignatureFirstLine({
id: Number(bountyId),
Expand Down
5 changes: 5 additions & 0 deletions src/components/bounty/ClaimItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ export default function ClaimItem({

const signMutation = useMutation({
mutationFn: async (claimId: string) => {
const chainId = await account.connector?.getChainId();
if (chainId !== 8453) {
//arbitrum has a problem with message signing, so all confirmations are on base
await switctChain.switchChainAsync({ chainId: 8453 });
}
const message = getBanSignatureFirstLine({
id: Number(claimId),
chainId: chain.id,
Expand Down
2 changes: 1 addition & 1 deletion src/trpc/routers/_app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ export const appRouter = createTRPCRouter({
}

const isAdmin = checkIsAdmin(input.address);
const chain = chains[input.chainName];
const chain = chains['base'];

if (!isAdmin) {
throw new TRPCError({
Expand Down

0 comments on commit bdff144

Please sign in to comment.