Commit b0ff0f83 authored by Noah Zinsmeister's avatar Noah Zinsmeister Committed by GitHub

fix crash (#3634)

parent 5cf9e84d
......@@ -113,6 +113,7 @@ interface FormattedProposalLog {
const FOUR_BYTES_DIR: { [sig: string]: string } = {
'0x5ef2c7f0': 'setSubnodeRecord(bytes32,bytes32,address,address,uint64)',
'0x10f13a8c': 'setText(bytes32,string,string)',
'0xb4720477': 'sendMessageToChild(address,bytes)',
}
/**
......@@ -181,7 +182,7 @@ function useFormattedProposalCreatedLogs(
let types: string
if (signature === '') {
const fourbyte = calldata.slice(0, 10)
const sig = FOUR_BYTES_DIR[fourbyte]
const sig = FOUR_BYTES_DIR[fourbyte] ?? 'UNKNOWN()'
if (!sig) throw new Error('Missing four byte sig')
;[name, types] = sig.substring(0, sig.length - 1).split('(')
calldata = `0x${calldata.slice(10)}`
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment