diff --git a/.github/workflows/build-workflow.yml b/.github/workflows/build-workflow.yml index 56d92f0..e76e41c 100644 --- a/.github/workflows/build-workflow.yml +++ b/.github/workflows/build-workflow.yml @@ -11,15 +11,15 @@ jobs: echo Building ${GITHUB_REF}... - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 + uses: actions/setup-node@v3 with: - node-version: '15.x' + node-version: '18.11' - name: Cache Node Modules - uses: actions/cache@v2 + uses: actions/cache@v3 env: cache-name: cache-node-modules with: @@ -32,7 +32,7 @@ jobs: ${{ runner.os }}- - name: Cache Elm Stuff - uses: actions/cache@v2 + uses: actions/cache@v3 env: cache-name: cache-elm-stuff with: diff --git a/package.json b/package.json index 97c2d50..e2b5b6a 100644 --- a/package.json +++ b/package.json @@ -4,8 +4,8 @@ "description": "The Compound Web3 Front-end", "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", + "build": "node --unhandled-rejections=strict --max-old-space-size=8192 --openssl-legacy-provider scripts/build.js", + "start": "node --unhandled-rejections=strict --openssl-legacy-provider scripts/start.js dapp", "package": "elm-package", "make": "elm-make", "repl": "elm-repl", @@ -13,7 +13,7 @@ "watch-css": "npx dart-sass --watch -I. -Inode_modules src/scss:src/css-build", "build-css": "npx dart-sass -I. -Inode_modules src/scss:src/css-build", "deploy-gcloud": "bash scripts/deploy-gcloud.sh", - "deploy-ipfs": "node --experimental-repl-await scripts/ipfs.js", + "deploy-ipfs": "node --experimental-repl-await --trace-warnings scripts/ipfs.js", "i18n": "node --unhandled-rejections=strict config/tx-cli.js -a 'src/strings/always_english_strings.json' -p 'src/strings/strings..json' -s en -l es zh fr ko -o src/elm/Strings/Translations.elm -m Strings.Translations -t", "watch-i18n": "node --unhandled-rejections=strict config/tx-cli.js -a 'src/strings/always_english_strings.json' -p 'src/strings/strings..json' -s en -l es zh fr ko -o src/elm/Strings/Translations.elm -m Strings.Translations -t -w", "release": "node --unhandled-rejections=strict scripts/release.js", @@ -65,7 +65,7 @@ "react-dev-utils": "^10.2.1", "react-error-overlay": "^6.0.7", "regenerator-runtime": "^0.13.5", - "solc": "^0.8.19", + "solc": "^0.8.21", "string-replace-loader": "^2.1.1", "style-loader": "^1.2.1", "sw-precache-webpack-plugin": "^1.0.0", diff --git a/src/elm/Main.elm b/src/elm/Main.elm index a65be67..c06b377 100644 --- a/src/elm/Main.elm +++ b/src/elm/Main.elm @@ -83,8 +83,6 @@ type Msg | Tick Time.Posix | SetTimeZone Time.Zone | VoteMsg Vote.InternalMsg - | CheckVersion Time.Posix - | CheckedVersion (Result Http.Error Float) | RefreshGasPrice (Result Http.Error CompoundApi.GasService.Models.API_GasPriceResponse) @@ -292,7 +290,6 @@ init { path, configurations, configAbiFiles, dataProviders, apiBaseUrlMap, userA , Cmd.map WrappedPreferencesMsg initPreferencesCmd , Cmd.map WrappedBNTransactionMsg initBNTransactionCmd , Task.perform Tick Time.now - , Task.perform CheckVersion Time.now , Task.perform SetTimeZone Time.here ] ) @@ -326,7 +323,6 @@ newBlockCmd apiBaseUrlMap maybeNetwork blockNumber previousBlockNumber ({ dataPr _ -> [] - in Cmd.batch <| pageCmds @@ -391,6 +387,7 @@ handleUpdatesFromEthConnectedWallet maybeConfig connectedEthWalletMsg model = refreshBlockCmd = if model.network /= Just newNetwork then newBlockCmd model.apiBaseUrlMap (Just newNetwork) blockNumber Nothing model + else Cmd.none in @@ -763,34 +760,9 @@ update msg ({ page, configs, apiBaseUrlMap, account, transactionState, bnTransac , Cmd.map voteTranslator loadDelegateeCmd ) - CheckVersion time -> - let - versionUrl = - ".__v.json" - - versionDecoder = - Json.Decode.field "version" Json.Decode.float - in - ( model, Http.send CheckedVersion (Http.get versionUrl versionDecoder) ) - SetTimeZone timeZone -> ( { model | currentTimeZone = timeZone }, Cmd.none ) - CheckedVersion (Ok latestVersion) -> - case model.appVersion of - Just currentVersion -> - if latestVersion /= currentVersion then - ( model, Browser.Navigation.reload ) - - else - ( model, Cmd.none ) - - Nothing -> - ( { model | appVersion = Just latestVersion }, Cmd.none ) - - CheckedVersion (Err e) -> - ( model, Cmd.none ) - SetBlockNumber blockNumber -> ( { model | blockNumber = Just blockNumber }, newBlockCmd apiBaseUrlMap model.network blockNumber model.blockNumber model ) @@ -1117,10 +1089,11 @@ update msg ({ page, configs, apiBaseUrlMap, account, transactionState, bnTransac view : Model -> Html Msg -view ({userLanguage} as model) = +view ({ userLanguage } as model) = Html.div [ id "main" ] (viewFull model) + viewFull : Model -> List (Html Msg) viewFull ({ page, liquidateModel, transactionState, compoundState, tokenState, oracleState, configs, configAbis, network, preferences, account, blockNumber, userLanguage } as model) = let @@ -1417,7 +1390,6 @@ subscriptions model = , Sub.map voteTranslator (Vote.subscriptions model.voteModel) , Sub.map WrappedGovernanceMsg Eth.Governance.subscriptions , Time.every (1000.0 * 1.0 * toFloat CompoundComponents.Utils.Time.seconds) Tick - , Time.every (1000.0 * 4.0 * toFloat CompoundComponents.Utils.Time.hours) CheckVersion , onUrlChange (Url.fromString >> UrlChange) ] diff --git a/yarn.lock b/yarn.lock index c2a5370..d522993 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10860,10 +10860,10 @@ sockjs@^0.3.21: uuid "^3.4.0" websocket-driver "^0.7.4" -solc@^0.8.17, solc@^0.8.19: - version "0.8.19" - resolved "https://registry.yarnpkg.com/solc/-/solc-0.8.19.tgz#cac6541106ae3cff101c740042c7742aa56a2ed3" - integrity sha512-yqurS3wzC4LdEvmMobODXqprV4MYJcVtinuxgrp61ac8K2zz40vXA0eSAskSHPgv8dQo7Nux39i3QBsHx4pqyA== +solc@^0.8.17, solc@^0.8.21: + version "0.8.21" + resolved "https://registry.yarnpkg.com/solc/-/solc-0.8.21.tgz#c3cd505c360ea2fa0eaa5ab574ef96bffb1a2766" + integrity sha512-N55ogy2dkTRwiONbj4e6wMZqUNaLZkiRcjGyeafjLYzo/tf/IvhHY5P5wpe+H3Fubh9idu071i8eOGO31s1ylg== dependencies: command-exists "^1.2.8" commander "^8.1.0"