Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
interface
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
LuckySwap
interface
Commits
b0ff0f83
Unverified
Commit
b0ff0f83
authored
Mar 31, 2022
by
Noah Zinsmeister
Committed by
GitHub
Mar 31, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix crash (#3634)
parent
5cf9e84d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
hooks.ts
src/state/governance/hooks.ts
+2
-1
No files found.
src/state/governance/hooks.ts
View file @
b0ff0f83
...
@@ -113,6 +113,7 @@ interface FormattedProposalLog {
...
@@ -113,6 +113,7 @@ interface FormattedProposalLog {
const
FOUR_BYTES_DIR
:
{
[
sig
:
string
]:
string
}
=
{
const
FOUR_BYTES_DIR
:
{
[
sig
:
string
]:
string
}
=
{
'
0x5ef2c7f0
'
:
'
setSubnodeRecord(bytes32,bytes32,address,address,uint64)
'
,
'
0x5ef2c7f0
'
:
'
setSubnodeRecord(bytes32,bytes32,address,address,uint64)
'
,
'
0x10f13a8c
'
:
'
setText(bytes32,string,string)
'
,
'
0x10f13a8c
'
:
'
setText(bytes32,string,string)
'
,
'
0xb4720477
'
:
'
sendMessageToChild(address,bytes)
'
,
}
}
/**
/**
...
@@ -181,7 +182,7 @@ function useFormattedProposalCreatedLogs(
...
@@ -181,7 +182,7 @@ function useFormattedProposalCreatedLogs(
let
types
:
string
let
types
:
string
if
(
signature
===
''
)
{
if
(
signature
===
''
)
{
const
fourbyte
=
calldata
.
slice
(
0
,
10
)
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
'
)
if
(
!
sig
)
throw
new
Error
(
'
Missing four byte sig
'
)
;[
name
,
types
]
=
sig
.
substring
(
0
,
sig
.
length
-
1
).
split
(
'
(
'
)
;[
name
,
types
]
=
sig
.
substring
(
0
,
sig
.
length
-
1
).
split
(
'
(
'
)
calldata
=
`0x
${
calldata
.
slice
(
10
)}
`
calldata
=
`0x
${
calldata
.
slice
(
10
)}
`
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment