diff --git a/src/routes/diamond/[address]/EditFacet.svelte b/src/routes/diamond/[address]/EditFacet.svelte index 6fbd91e..08fd020 100644 --- a/src/routes/diamond/[address]/EditFacet.svelte +++ b/src/routes/diamond/[address]/EditFacet.svelte @@ -22,6 +22,8 @@ parseAbi, zeroAddress, type WriteContractReturnType, + type AbiItem, + type AbiFunction, } from 'viem' import type { Chain } from 'viem/chains' import ConnectWallet from './ConnectWallet.svelte' @@ -263,6 +265,13 @@ } } } + + const getFunctionSelector = (m: AbiFunction) => { + if (m.name.indexOf('unknown_') > -1) { + return m.name.split('_')[1] + } + return toFunctionSelector(m) + }
@@ -364,10 +373,10 @@
@@ -375,12 +384,12 @@
- {toFunctionSelector(m)} + {getFunctionSelector(m)} {m.name}
@@ -423,23 +432,23 @@ - r.includes(toFunctionSelector(m)), + r.includes(getFunctionSelector(m)), )} />
- r.includes(toFunctionSelector(m)), + r.includes(getFunctionSelector(m)), )} class="flex items-center p-1 rounded-md bg-opacity-90" > - {toFunctionSelector(m)} + {getFunctionSelector(m)} {m.name}