Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
bokkypoobah committed Dec 18, 2023
1 parent 78c0308 commit 5b7cd46
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/customNames.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const CUSTOMNAMES = {
"0x9996FCFa25B234e80BcF876d83d2e7F338F9BDA5": ["erc721exchange", "EnsSubdomainStorefront_v2", "ENSVision:EnsSubdomainStorefront_v2"],
"0xA42f6cADa809Bcf417DeefbdD69C5C5A909249C0": ["erc721exchange", "NFT20CasUpgreadableV2", "NFT20:NFT20CasUpgreadableV2"],
"0xB32979486938AA9694BFC898f35DBED459F44424": ["erc1155", "NYAN", "Nyan Cat"],
"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2": ["erc20", "WETH", "Wrapped Ether"],
"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2": ["erc20", "WETH", "Wrapped Ether", 18],
"0xd07dc4262BCDbf85190C01c996b4C06a461d2430": ["erc1155", "RARI", "Rarible:RARI Token 3"],
"0xD4416b13d2b3a9aBae7AcD5D6C2BbDBE25686401": ["erc1155", "NameWrapper", "ENS:NameWrapper"],
};
Expand Down
10 changes: 7 additions & 3 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,14 @@
<b-form-input type="text" size="sm" readonly id="approval-symbol" :value="modalApproval.item.symbol" class="w-25"></b-form-input>
</b-form-group>
<b-form-group v-if="modalApproval.item && modalApproval.item.name" label="Name:" label-for="approval-name" label-size="sm" label-cols-sm="2" label-align-sm="right" class="mx-0 my-1 p-0">
<b-form-input type="text" size="sm" readonly id="approval-name" :value="modalApproval.item.name" class="w-100"></b-form-input>
<b-form-input type="text" size="sm" readonly id="approval-name" :value="modalApproval.item.name" class="w-75"></b-form-input>
</b-form-group>
<b-form-group v-if="modalApproval.item && modalApproval.item.type" label="Type:" label-for="approval-type" label-size="sm" label-cols-sm="2" label-align-sm="right" class="mx-0 my-1 p-0">
<b-form-input type="text" size="sm" readonly id="approval-type" :value="modalApproval.item.type" class="w-25"></b-form-input>
</b-form-group>
<b-form-group v-if="modalApproval.item && modalApproval.item.decimals" label="Type:" label-for="approval-decimals" label-size="sm" label-cols-sm="2" label-align-sm="right" class="mx-0 my-1 p-0">
<b-form-input type="text" size="sm" readonly id="approval-decimals" :value="modalApproval.item.decimals" class="w-25"></b-form-input>
</b-form-group>
<!-- <b-form-group v-if="modalApproval.item && modalApproval.item.contract" label="Address:" label-for="approval-address" label-size="sm" label-cols-sm="2" label-align-sm="right" class="mx-0 my-1 p-0">
<font size="-1">
<b-button size="sm" variant="link" id="approval-address" :href="'https://etherscan.io/address/' + modalApproval.item.contract + '#code'" v-b-popover.hover.bottom="'Click to view in etherscan.io'" target="_blank">{{ modalApproval.item.contract }}</b-button>
Expand Down Expand Up @@ -841,11 +844,11 @@ <h4>Welcome</h4>
if (approvals) {
if (type == "erc721") {
for (const [value, spender] of Object.entries(approvals)) {
results.push({ contract, type, approvalType: "Approval", symbol, name, source, owner, spender, value });
results.push({ contract, type, approvalType: "Approval", symbol, name, source, owner, spender, value });
}
} else if (type == "erc20") {
for (const [spender, value] of Object.entries(approvals)) {
results.push({ contract, type, approvalType: "Approval", symbol, name, source, owner, spender, value });
results.push({ contract, type, approvalType: "Approval", symbol, name, source, owner, spender, value, decimals: accountData.decimals });
}
}
}
Expand Down Expand Up @@ -1168,6 +1171,7 @@ <h4>Welcome</h4>
accounts[account].type = CUSTOMNAMES[account][0];
accounts[account].symbol = CUSTOMNAMES[account][1];
accounts[account].name = CUSTOMNAMES[account][2];
accounts[account].decimals = CUSTOMNAMES[account].length >= 4 ? CUSTOMNAMES[account][3] : undefined;
} else {
try {
const tokenInfos = await erc721Helper.tokenInfo([account], { gasLimit: 1000000 });
Expand Down

0 comments on commit 5b7cd46

Please sign in to comment.