Skip to content

Commit

Permalink
chore: remove unneeded signer check
Browse files Browse the repository at this point in the history
  • Loading branch information
Keyrxng committed May 24, 2024
1 parent edad316 commit 3dcd677
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
3 changes: 0 additions & 3 deletions cypress/e2e/claim-portal-failure.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ describe("Claims Portal Failures", () => {
});

it("should handle no connected signer", () => {
/**
* This covers a user declining to connect their wallet
*/
cy.get("#additionalDetails", { timeout: 15000 }).should("be.visible").invoke("click");

cy.get("button[id='make-claim']").should("be.visible").click();
Expand Down
6 changes: 1 addition & 5 deletions static/scripts/rewards/web3/erc20-permit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -287,11 +287,7 @@ async function isNonceClaimed(app: AppState): Promise<boolean> {
return bit.and(flipped).eq(0);
}

async function invalidateNonce(signer: JsonRpcSigner | null, nonce: BigNumberish): Promise<void> {
if (!signer) {
console.error("Signer is null");
return;
}
async function invalidateNonce(signer: JsonRpcSigner, nonce: BigNumberish): Promise<void> {
const permit2Contract = new ethers.Contract(permit2Address, permit2Abi, signer);
const { wordPos, bitPos } = nonceBitmap(nonce);
// mimics https://github.com/ubiquity/pay.ubq.fi/blob/c9e7ed90718fe977fd9f348db27adf31d91d07fb/scripts/solidity/test/Permit2.t.sol#L428
Expand Down

0 comments on commit 3dcd677

Please sign in to comment.