Skip to content

Commit 932ed01

Browse files
Add v2 deprecation banner. (#92)
* Add v2 deprecation banner. * Update actions/cache to v4 since v2 is deprecated.
1 parent 114220a commit 932ed01

File tree

4 files changed

+28
-37
lines changed

4 files changed

+28
-37
lines changed

.github/workflows/build-workflow.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
node-version: '16'
2020

2121
- name: Cache Node Modules
22-
uses: actions/cache@v2
22+
uses: actions/cache@v4
2323
env:
2424
cache-name: cache-node-modules
2525
with:
@@ -32,7 +32,7 @@ jobs:
3232
${{ runner.os }}-
3333
3434
- name: Cache Elm Stuff
35-
uses: actions/cache@v2
35+
uses: actions/cache@v4
3636
env:
3737
cache-name: cache-elm-stuff
3838
with:

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"main": "index.js",
66
"scripts": {
77
"build": "node --unhandled-rejections=strict --max-old-space-size=8192 scripts/build.js",
8-
"start": "node --unhandled-rejections=strict scripts/start.js dapp",
8+
"start": "node --openssl-legacy-provider --unhandled-rejections=strict scripts/start.js dapp",
99
"package": "elm-package",
1010
"make": "elm-make",
1111
"repl": "elm-repl",

src/elm/DappInterface/OverviewHeader.elm

Lines changed: 13 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -130,41 +130,21 @@ view maybeConfig maybeEtherUsdPrice ({ borrowingContainerState, preferences } as
130130
, div [ class "headline headline--loading" ] []
131131
)
132132

133-
migratorAlertBanner =
134-
cTokens
135-
|> List.filter (\ctoken -> ctoken.underlying.symbol == "USDC")
136-
|> List.head
137-
|> Maybe.andThen
138-
(\cUSDC -> Balances.getUnderlyingBalances mainModel.compoundState cUSDC.contractAddress)
139-
|> Maybe.andThen
140-
(\balances ->
141-
let
142-
alertView =
143-
div [ class "container-large" ]
144-
[ div [ class "migrator-alert" ]
145-
[ div [ class "migrator-alert__badge" ] [ text "NEW" ]
146-
, label [ class "migrator-alert__title" ] [ text "Migrate your V2 balances!" ]
147-
, label [ class "migrator-alert__description" ]
148-
[ text "Transfer multiple balances to Compound V3 in a single transaction using our new "
149-
, a (href External "https://app.compound.finance/extensions/comet_migrator") [ text "migrator tool" ]
150-
, text "."
151-
]
152-
, div [ class "close-x" ]
153-
[ button [ onClickStopPropagation (ForPreferences (Preferences.SetShowMigratorAlert False)) ] []
154-
]
155-
]
156-
]
157-
in
158-
if Decimal.gt balances.underlyingBorrowBalance Decimal.zero && preferences.showMigratorAlert then
159-
Just alertView
160-
161-
else
162-
Nothing
163-
)
164-
|> Maybe.withDefault (text "")
133+
alertView =
134+
div [ class "container-large" ]
135+
[ div [ class "migrator-alert" ]
136+
[ label [ class "migrator-alert__title" ]
137+
[ text "V2 Deprecation has begun. Please begin migrating positions to V3 for continued support. Learn more in this "
138+
, a (href External "https://www.comp.xyz/t/gauntlet-compound-v2-deprecation-proposal/7237") [ text "forum post" ]
139+
, text ". Get started with "
140+
, a (href External "https://app.compound.finance/") [ text "V3 here" ]
141+
, text "."
142+
]
143+
]
144+
]
165145
in
166146
section [ id "borrow-overview", class "hero" ]
167-
[ migratorAlertBanner
147+
[ alertView
168148
, div [ class "balance-totals" ]
169149
[ div [ class "content" ]
170150
[ div [ class "row align-middle mobile-hide" ]

src/scss/main.scss

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,7 @@ body {
239239
display: flex;
240240
margin-bottom: 3.25rem;
241241
padding: 0.825rem 0.75rem;
242+
justify-content: center;
242243

243244
&__badge {
244245
background-color: #073e2e;
@@ -256,9 +257,19 @@ body {
256257
color: $color_light_1;
257258
font-style: normal;
258259
font-weight: 500;
259-
font-size: 11px;
260+
font-size: 13px;
260261
line-height: 16px;
261262
margin-right: 0.5rem;
263+
264+
a {
265+
font-style: normal;
266+
font-weight: 400;
267+
font-size: 13px;
268+
line-height: 16px;
269+
letter-spacing: inherit;
270+
text-transform: none;
271+
text-decoration: underline;
272+
}
262273
}
263274

264275
&__description {

0 commit comments

Comments
 (0)