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
86b85e25
Unverified
Commit
86b85e25
authored
May 09, 2022
by
Noah Zinsmeister
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix proposal formatting
parent
0ea635ce
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
index.ts
src/constants/proposals/index.ts
+1
-0
hooks.ts
src/state/governance/hooks.ts
+7
-2
No files found.
src/constants/proposals/index.ts
View file @
86b85e25
...
...
@@ -2,3 +2,4 @@ export const UNISWAP_GRANTS_START_BLOCK = 11473815
export
const
BRAVO_START_BLOCK
=
13059344
export
const
ONE_BIP_START_BLOCK
=
13551293
export
const
POLYGON_START_BLOCK
=
13786993
export
const
MOONBEAN_START_BLOCK
=
14732457
src/state/governance/hooks.ts
View file @
86b85e25
...
...
@@ -26,6 +26,7 @@ import { calculateGasMargin } from 'utils/calculateGasMargin'
import
{
SupportedChainId
}
from
'
../../constants/chains
'
import
{
BRAVO_START_BLOCK
,
MOONBEAN_START_BLOCK
,
ONE_BIP_START_BLOCK
,
POLYGON_START_BLOCK
,
UNISWAP_GRANTS_START_BLOCK
,
...
...
@@ -168,8 +169,12 @@ function useFormattedProposalCreatedLogs(
description
=
JSON
.
parse
(
toUtf8String
(
error
.
error
.
value
,
onError
))
||
''
}
// Bravo and one bip proposals omit newlines
if
(
startBlock
===
BRAVO_START_BLOCK
||
startBlock
===
ONE_BIP_START_BLOCK
)
{
// some proposals omit newlines
if
(
startBlock
===
BRAVO_START_BLOCK
||
startBlock
===
ONE_BIP_START_BLOCK
||
startBlock
===
MOONBEAN_START_BLOCK
)
{
description
=
description
.
replace
(
/
{2}
/g
,
'
\n
'
).
replace
(
/
\d\.
/g
,
'
\n
$&
'
)
}
...
...
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