Fix proxy/delegatecall scenarios

This commit is contained in:
Willian Mitsuda 2021-09-22 03:02:21 -03:00
parent 7f15a12f4a
commit 4ec5fb7681
1 changed files with 9 additions and 4 deletions

View File

@ -199,10 +199,15 @@ export const useTransactionDescription = (
const abi = metadata.output.abi;
const intf = new Interface(abi as any);
return intf.parseTransaction({
data: txData.data,
value: txData.value,
});
try {
return intf.parseTransaction({
data: txData.data,
value: txData.value,
});
} catch (err) {
console.warn("Couldn't find function signature", err);
return null;
}
}, [metadata, txData]);
return txDesc;