Skip to content

Commit

Permalink
feat: shorten "From" in details
Browse files Browse the repository at this point in the history
  • Loading branch information
zugdev committed Oct 14, 2024
1 parent 320cd40 commit b49974c
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ function formatLargeNumber(value: BigNumber, decimals: number): string {
const num = parseFloat(ethers.utils.formatUnits(value, decimals));

if (num >= 1_000_000_000_000_000) {
return "Unlimited"; // we can consider quintillion and above basically unlimited
return "Unlimited"; // we can consider quintillion and above basically unlimited
} else if (num >= 1_000_000_000_000) {
return `${(num / 1_000_000_000_000).toFixed(1)}T`; // i.e: 1.2T
} else if (num >= 1_000_000_000) {
Expand All @@ -34,7 +34,10 @@ export function insertErc20PermitTableData(
renderToFields(reward.beneficiary, app.currentExplorerUrl);
renderTokenFields(reward.tokenAddress, app.currentExplorerUrl);
renderDetailsFields([
{ name: "From", value: `<a target="_blank" rel="noopener noreferrer" href="${app.currentExplorerUrl}/address/${reward.owner}">${reward.owner}</a>` },
{
name: "From",
value: `<a target="_blank" rel="noopener noreferrer" href="${app.currentExplorerUrl}/address/${reward.owner}">${shortenAddress(reward.owner)}</a>`,
},
{
name: "Expiry",
value: (() => {
Expand Down

0 comments on commit b49974c

Please sign in to comment.