From d842bb78c1072e080681251d2f305b18767c1d44 Mon Sep 17 00:00:00 2001 From: Peter Kompasz Date: Mon, 19 Aug 2024 22:07:56 +0200 Subject: [PATCH] chore: use correct types --- .../render-transaction/insert-table-data.ts | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/static/scripts/rewards/render-transaction/insert-table-data.ts b/static/scripts/rewards/render-transaction/insert-table-data.ts index 2a539dcc..7b96d3a1 100644 --- a/static/scripts/rewards/render-transaction/insert-table-data.ts +++ b/static/scripts/rewards/render-transaction/insert-table-data.ts @@ -1,4 +1,4 @@ -import { ERC20Permit, ERC721Permit } from "@ubiquibot/permit-generation/types"; +import { ERC20PermitReward, ERC721PermitReward } from "@ubiquibot/permit-generation/types"; import { BigNumber, ethers } from "ethers"; import { app } from "../app-state"; import { ButtonController } from "../button-controller"; @@ -9,7 +9,7 @@ function shortenAddress(address: string): string { } export function insertErc20PermitTableData( - reward: ERC20Permit, + reward: ERC20PermitReward, table: Element, treasury: { balance: BigNumber; allowance: BigNumber; decimals: number; symbol: string } ): Element { @@ -19,14 +19,7 @@ export function insertErc20PermitTableData( [ { name: "From", - value: ` - -
${reward.owner}
-
- -
${shortenAddress(reward.owner)}
-
-
`, + value: `${reward.owner}`, }, { name: "Expiry", @@ -49,7 +42,7 @@ export function insertErc20PermitTableData( return table.querySelector(".reward-amount") as Element; } -export function insertErc721PermitTableData(reward: ERC721Permit, table: Element): Element { +export function insertErc721PermitTableData(reward: ERC721PermitReward, table: Element): Element { const requestedAmountElement = table.querySelector(".reward-amount") as Element; renderToFields(reward.beneficiary, app.getCurrentExplorerUrl(reward), table); renderTokenFields(reward.tokenAddress, app.getCurrentExplorerUrl(reward), table);