diff --git a/.cspell.json b/.cspell.json index fd192d49..216070ff 100644 --- a/.cspell.json +++ b/.cspell.json @@ -41,7 +41,8 @@ "URLSAFE", "WXDAI", "XDAI", - "xmark" + "xmark", + "outfile" ], "dictionaries": ["typescript", "node", "software-terms", "html"], "import": ["@cspell/dict-typescript/cspell-ext.json", "@cspell/dict-node/cspell-ext.json", "@cspell/dict-software-terms"], diff --git a/.github/workflows/sync-template.yml b/.github/workflows/sync-template.yml index dc92ad59..8b6c4358 100644 --- a/.github/workflows/sync-template.yml +++ b/.github/workflows/sync-template.yml @@ -3,7 +3,7 @@ name: Sync branch to template on: workflow_dispatch: schedule: - - cron: '14 0 1 * *' + - cron: "14 0 1 * *" jobs: sync: @@ -23,7 +23,7 @@ jobs: with: app_id: ${{ secrets.APP_ID }} private_key: ${{ secrets.APP_PRIVATE_KEY }} - + - name: Sync branch to template env: GH_TOKEN: ${{ steps.get_installation_token.outputs.token }} @@ -45,5 +45,3 @@ jobs: git commit -m "chore: sync template" git push "$original_remote" "$pr_branch" gh pr create --title "Sync branch to template" --body "This pull request merges changes from the template repository." --head "$pr_branch" --base "$branch_name" - - diff --git a/package.json b/package.json index 6906f1b4..320cf0f0 100644 --- a/package.json +++ b/package.json @@ -91,4 +91,4 @@ "@commitlint/config-conventional" ] } -} \ No newline at end of file +} diff --git a/static/scripts/rewards/web3/erc20-permit.ts b/static/scripts/rewards/web3/erc20-permit.ts index 9e1fe826..7406a882 100644 --- a/static/scripts/rewards/web3/erc20-permit.ts +++ b/static/scripts/rewards/web3/erc20-permit.ts @@ -100,14 +100,8 @@ async function transferFromPermit(permit2Contract: Contract, app: AppState) { async function waitForTransaction(tx: TransactionResponse) { try { const receipt = await tx.wait(); - viewClaimButton.onclick = () => { - window.open(`https://blockscan.com/tx/${receipt.transactionHash}`, "_blank"); - }; toaster.create("success", `Claim Complete.`); - buttonController.showViewClaim(); - buttonController.hideLoader(); - buttonController.hideMakeClaim(); console.log(receipt.transactionHash); return receipt; @@ -140,9 +134,15 @@ export function claimErc20PermitHandlerWrapper(app: AppState) { const permit2Contract = new ethers.Contract(permit2Address, permit2Abi, signer); if (!permit2Contract) return; - const tx = await transferFromPermit(permit2Contract, app); + const tx: TransactionResponse = await transferFromPermit(permit2Contract, app); if (!tx) return; + viewClaimButton.onclick = () => window.open(`https://blockscan.com/tx/${tx.hash}`, "_blank"); + + buttonController.showViewClaim(); + buttonController.hideLoader(); + buttonController.hideMakeClaim(); + const receipt = await waitForTransaction(tx); if (!receipt) return;