Skip to content

Commit

Permalink
Merge pull request #248 from ubq-testing/nft-table-fix
Browse files Browse the repository at this point in the history
fix: move controls into sight
  • Loading branch information
0x4007 authored Jun 17, 2024
2 parents 8b1c07d + 4a2b8d1 commit b7dd348
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export async function renderTransaction(): Promise<Success> {

if (isErc20Permit(app.reward)) {
const treasury = await fetchTreasury(app.reward);
table.setAttribute(`data-additional-data-size`, "small");

// insert tx data into table
const requestedAmountElement = insertErc20PermitTableData(app, table, treasury);
Expand Down Expand Up @@ -63,6 +64,7 @@ export async function renderTransaction(): Promise<Success> {
} else {
const requestedAmountElement = insertErc721PermitTableData(app.reward, table);
table.setAttribute(`data-make-claim`, "ok");
table.setAttribute(`data-additional-data-size`, "large");
renderNftSymbol({
tokenAddress: app.reward.tokenAddress,
explorerUrl: networkExplorers[app.reward.networkId],
Expand All @@ -71,7 +73,7 @@ export async function renderTransaction(): Promise<Success> {
}).catch(console.error);

const toElement = document.getElementById(`rewardRecipient`) as Element;
renderEnsName({ element: toElement, address: app.reward.beneficiary }).catch(console.error);
renderEnsName({ element: toElement, address: app.reward.beneficiary, networkID: app.networkId }).catch(console.error);

getMakeClaimButton().addEventListener("click", claimErc721PermitHandler(app.reward));
}
Expand Down
5 changes: 5 additions & 0 deletions static/styles/rewards/claim-table.css
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,11 @@ table #additionalDetailsTable {
pointer-events: none;
transform: translate(-50%, -90px);
}
table[data-additional-data-size="large"] #additionalDetailsTable {
opacity: 0;
pointer-events: none;
transform: translate(-50%, -175px);
}
table[data-details-visible="true"] #additionalDetailsTable {
opacity: 1;
pointer-events: all;
Expand Down

0 comments on commit b7dd348

Please sign in to comment.