Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
node-version: '16'

- name: Cache Node Modules
uses: actions/cache@v2
uses: actions/cache@v4
env:
cache-name: cache-node-modules
with:
Expand All @@ -32,7 +32,7 @@ jobs:
${{ runner.os }}-

- name: Cache Elm Stuff
uses: actions/cache@v2
uses: actions/cache@v4
env:
cache-name: cache-elm-stuff
with:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"main": "index.js",
"scripts": {
"build": "node --unhandled-rejections=strict --max-old-space-size=8192 scripts/build.js",
"start": "node --unhandled-rejections=strict scripts/start.js dapp",
"start": "node --openssl-legacy-provider --unhandled-rejections=strict scripts/start.js dapp",
"package": "elm-package",
"make": "elm-make",
"repl": "elm-repl",
Expand Down
46 changes: 13 additions & 33 deletions src/elm/DappInterface/OverviewHeader.elm
Original file line number Diff line number Diff line change
Expand Up @@ -130,41 +130,21 @@ view maybeConfig maybeEtherUsdPrice ({ borrowingContainerState, preferences } as
, div [ class "headline headline--loading" ] []
)

migratorAlertBanner =
cTokens
|> List.filter (\ctoken -> ctoken.underlying.symbol == "USDC")
|> List.head
|> Maybe.andThen
(\cUSDC -> Balances.getUnderlyingBalances mainModel.compoundState cUSDC.contractAddress)
|> Maybe.andThen
(\balances ->
let
alertView =
div [ class "container-large" ]
[ div [ class "migrator-alert" ]
[ div [ class "migrator-alert__badge" ] [ text "NEW" ]
, label [ class "migrator-alert__title" ] [ text "Migrate your V2 balances!" ]
, label [ class "migrator-alert__description" ]
[ text "Transfer multiple balances to Compound V3 in a single transaction using our new "
, a (href External "https://app.compound.finance/extensions/comet_migrator") [ text "migrator tool" ]
, text "."
]
, div [ class "close-x" ]
[ button [ onClickStopPropagation (ForPreferences (Preferences.SetShowMigratorAlert False)) ] []
]
]
]
in
if Decimal.gt balances.underlyingBorrowBalance Decimal.zero && preferences.showMigratorAlert then
Just alertView

else
Nothing
)
|> Maybe.withDefault (text "")
alertView =
div [ class "container-large" ]
[ div [ class "migrator-alert" ]
[ label [ class "migrator-alert__title" ]
[ text "V2 Deprecation has begun. Please begin migrating positions to V3 for continued support. Learn more in this "
, a (href External "https://www.comp.xyz/t/gauntlet-compound-v2-deprecation-proposal/7237") [ text "forum post" ]
, text ". Get started with "
, a (href External "https://app.compound.finance/") [ text "V3 here" ]
, text "."
]
]
]
in
section [ id "borrow-overview", class "hero" ]
[ migratorAlertBanner
[ alertView
, div [ class "balance-totals" ]
[ div [ class "content" ]
[ div [ class "row align-middle mobile-hide" ]
Expand Down
13 changes: 12 additions & 1 deletion src/scss/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ body {
display: flex;
margin-bottom: 3.25rem;
padding: 0.825rem 0.75rem;
justify-content: center;

&__badge {
background-color: #073e2e;
Expand All @@ -256,9 +257,19 @@ body {
color: $color_light_1;
font-style: normal;
font-weight: 500;
font-size: 11px;
font-size: 13px;
line-height: 16px;
margin-right: 0.5rem;

a {
font-style: normal;
font-weight: 400;
font-size: 13px;
line-height: 16px;
letter-spacing: inherit;
text-transform: none;
text-decoration: underline;
}
}

&__description {
Expand Down