From 5094d84890ba675948bd81fca840e12a1eed8845 Mon Sep 17 00:00:00 2001 From: Alexander Khramov Date: Tue, 10 Oct 2023 17:38:06 +0300 Subject: [PATCH 1/7] chore: update reef-knot to v1.9.0 (coin98 update) --- package.json | 2 +- yarn.lock | 34 ++++++++++++++++++++-------------- 2 files changed, 21 insertions(+), 15 deletions(-) diff --git a/package.json b/package.json index 0fbe9bc65..0eb8b7393 100644 --- a/package.json +++ b/package.json @@ -65,7 +65,7 @@ "react-hook-form": "^7.45.2", "react-is": "^18.2.0", "react-transition-group": "^4.4.2", - "reef-knot": "^1.8.0", + "reef-knot": "^1.9.0", "remark": "^13.0.0", "remark-external-links": "^8.0.0", "remark-html": "^13.0.1", diff --git a/yarn.lock b/yarn.lock index b65a5b5ee..6cfcd0c40 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2950,10 +2950,10 @@ resolved "https://registry.yarnpkg.com/@polka/url/-/url-1.0.0-next.21.tgz#5de5a2385a35309427f6011992b544514d559aa1" integrity sha512-a5Sab1C4/icpTZVzZc5Ghpz88yQtGOyNqYXcZgOssB2uuAr+wF/MvN6bgtW32q7HHrvBki+BsZ0OuNv6EV3K9g== -"@reef-knot/connect-wallet-modal@1.6.2": - version "1.6.2" - resolved "https://registry.yarnpkg.com/@reef-knot/connect-wallet-modal/-/connect-wallet-modal-1.6.2.tgz#de6f8c8eb344929b165cb150fdc22dfbf12fd78a" - integrity sha512-kDJEw85j6cikoh9i5yIfQQl5seQGyUiDJWUvLUT24FPn/gsUM/5cimx/mWP+1yzxhU2ru+/vUIQjMmt4UVpTaQ== +"@reef-knot/connect-wallet-modal@1.7.0": + version "1.7.0" + resolved "https://registry.yarnpkg.com/@reef-knot/connect-wallet-modal/-/connect-wallet-modal-1.7.0.tgz#0fe41452f23796b8b4bb5293e6e7149f1e685fcc" + integrity sha512-l/d0nZj4xX8Zu6EDXLHFezJArOIJ+gpf8hLK+Y10ca/ZhxfO1EW+cOXc8lV3YlUdgZxv+ykyW2DZcEvPoOkE5g== dependencies: "@types/react" "17.0.53" "@types/react-dom" "17" @@ -3011,6 +3011,11 @@ resolved "https://registry.yarnpkg.com/@reef-knot/wallet-adapter-blockchaincom/-/wallet-adapter-blockchaincom-1.2.4.tgz#f33a125c658c635b098e333bbc7f84a58dd7a0af" integrity sha512-RViZe8fepuEJgZfYprRhNCkC8xD+dPNXd5xTwfhO2WqPOjTpUAHBP7kXwqrGr6IPrv7zWwdE6MY7c5PXzUbaQA== +"@reef-knot/wallet-adapter-coin98@1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@reef-knot/wallet-adapter-coin98/-/wallet-adapter-coin98-1.0.0.tgz#6038127642dbc4135c09321e91c19f413683900c" + integrity sha512-MdTnWvK9Jz0w4nRxmGJNW/gS+dgTzO0APzfvbuxHsYtllocrTzDCPAr75fwHrG0gTdV6Py5V67H74//JF5h1lA== + "@reef-knot/wallet-adapter-exodus@1.2.3": version "1.2.3" resolved "https://registry.yarnpkg.com/@reef-knot/wallet-adapter-exodus/-/wallet-adapter-exodus-1.2.3.tgz#9d9c57fe838a7b1c1ca8ccfcbceb73e4890b84e7" @@ -3056,14 +3061,15 @@ resolved "https://registry.yarnpkg.com/@reef-knot/wallets-icons/-/wallets-icons-1.0.0.tgz#14db791e78309f8a53d4a8a08e561d67a6757d93" integrity sha512-x3Numm/rRHbHLrMzZpD6dGb+b5F+ZdBdYe+0xZyqw3qPmS/K4M0Hh9sGWgw66iVhHOyiYWdmtVWpyg2mbg52Zg== -"@reef-knot/wallets-list@1.4.5": - version "1.4.5" - resolved "https://registry.yarnpkg.com/@reef-knot/wallets-list/-/wallets-list-1.4.5.tgz#65fb447cf950583d444b6abc7e6ac1c412a59a88" - integrity sha512-PdZHN5XfDImhBO6/crWxLu3bVu3sf5Mh44x4WPUDw9bC9lbBPgXsawyg6l9LdP3Zm6GW8O6x3xcLcVWR1LEUsA== +"@reef-knot/wallets-list@1.5.0": + version "1.5.0" + resolved "https://registry.yarnpkg.com/@reef-knot/wallets-list/-/wallets-list-1.5.0.tgz#086f0dda7c892df48173cdd031b5d88162ad3866" + integrity sha512-3UaFfnotWqlg1kVBTRN4lbnFnisaehnlucVrYAy4jpW5+9ACQ3VU4wN6VORMSdWVOFH01keqOtRXT6GeZVXQOA== dependencies: "@reef-knot/wallet-adapter-ambire" "1.2.4" "@reef-knot/wallet-adapter-bitkeep" "1.1.0" "@reef-knot/wallet-adapter-blockchaincom" "1.2.4" + "@reef-knot/wallet-adapter-coin98" "1.0.0" "@reef-knot/wallet-adapter-exodus" "1.2.3" "@reef-knot/wallet-adapter-okx" "1.3.0" "@reef-knot/wallet-adapter-phantom" "1.3.0" @@ -9416,19 +9422,19 @@ redent@^3.0.0: indent-string "^4.0.0" strip-indent "^3.0.0" -reef-knot@^1.8.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/reef-knot/-/reef-knot-1.8.0.tgz#1b559841d39c8554fec5941595c3b411654ae73a" - integrity sha512-5jR4liihZVhrcb84xjRImDRqb0d2t8EiHfrVO8yQRfIxF3hA/CNFAtLEjyoXSBeYuFCwe9dAHQdW0v6kmSmMuw== +reef-knot@^1.9.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/reef-knot/-/reef-knot-1.9.0.tgz#aa12062d6fbf3223bb001cbc00ff3b940028eae3" + integrity sha512-QQTS4ZcX9dS3+ssezQ67/kIaFBxqA+eBSD15v6Et/Mj+6OZ1kw6GW0cAHhAn531nTolE5YhV5g1Ttj3h0NOw5g== dependencies: - "@reef-knot/connect-wallet-modal" "1.6.2" + "@reef-knot/connect-wallet-modal" "1.7.0" "@reef-knot/core-react" "1.6.0" "@reef-knot/ledger-connector" "1.0.1" "@reef-knot/types" "1.3.0" "@reef-knot/ui-react" "1.0.7" "@reef-knot/wallets-helpers" "1.1.5" "@reef-knot/wallets-icons" "1.0.0" - "@reef-knot/wallets-list" "1.4.5" + "@reef-knot/wallets-list" "1.5.0" "@reef-knot/web3-react" "1.5.0" regenerate-unicode-properties@^10.1.0: From ee40dafba22c5cc98a228d0e9561344a659575d1 Mon Sep 17 00:00:00 2001 From: Andrei Date: Mon, 16 Oct 2023 22:48:35 +0700 Subject: [PATCH 2/7] fix: fix tests --- test/config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/config.ts b/test/config.ts index cdcf4cd1f..2411b2bb5 100644 --- a/test/config.ts +++ b/test/config.ts @@ -6,7 +6,7 @@ const STAND_CONFIGS = new Map([ [ 'testnet', { - chainId: 5, + chainId: 17000, }, ], [ From 0960f910751011ebb014570995a2dc721a6ad5a5 Mon Sep 17 00:00:00 2001 From: Andrei Date: Mon, 16 Oct 2023 22:54:02 +0700 Subject: [PATCH 3/7] fix: staging stand type --- test/config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/config.ts b/test/config.ts index 2411b2bb5..4a60b158e 100644 --- a/test/config.ts +++ b/test/config.ts @@ -10,7 +10,7 @@ const STAND_CONFIGS = new Map([ }, ], [ - 'staging', + 'staging-critical', { chainId: 1, }, From 6ce7e39317fedd7bdf7b9378fde9dbe002017cd8 Mon Sep 17 00:00:00 2001 From: Maxim Valeev Date: Tue, 17 Oct 2023 21:51:24 +1000 Subject: [PATCH 4/7] Disable goerli branch for deploy to preview --- .github/workflows/ci-preview-deploy.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci-preview-deploy.yml b/.github/workflows/ci-preview-deploy.yml index 251376208..413d2e46f 100644 --- a/.github/workflows/ci-preview-deploy.yml +++ b/.github/workflows/ci-preview-deploy.yml @@ -16,6 +16,7 @@ on: types: [opened, synchronize, reopened, ready_for_review] branches-ignore: - main + - goerli permissions: contents: read From 61fc645985217e58aee5e33de7bb559bc643fd5f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 17 Oct 2023 12:02:18 +0000 Subject: [PATCH 5/7] chore(deps): bump @babel/traverse from 7.20.13 to 7.23.2 Bumps [@babel/traverse](https://github.com/babel/babel/tree/HEAD/packages/babel-traverse) from 7.20.13 to 7.23.2. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.23.2/packages/babel-traverse) --- updated-dependencies: - dependency-name: "@babel/traverse" dependency-type: indirect ... Signed-off-by: dependabot[bot] --- yarn.lock | 165 ++++++++++++++++++++---------------------------------- 1 file changed, 60 insertions(+), 105 deletions(-) diff --git a/yarn.lock b/yarn.lock index b65a5b5ee..3066a9fd8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -149,22 +149,22 @@ "@jridgewell/trace-mapping" "^0.3.17" jsesc "^2.5.1" -"@babel/generator@^7.22.15": - version "7.22.15" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.22.15.tgz#1564189c7ec94cb8f77b5e8a90c4d200d21b2339" - integrity sha512-Zu9oWARBqeVOW0dZOjXc3JObrzuqothQ3y/n1kUtrjCoCPLkXUwMvOo/F/TCfoHMbWIFlWwpZtkZVb9ga4U2pA== +"@babel/generator@^7.22.9": + version "7.22.9" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.22.9.tgz#572ecfa7a31002fa1de2a9d91621fd895da8493d" + integrity sha512-KtLMbmicyuK2Ak/FTCJVbDnkN1SlT8/kceFTiuDiiRUUSMnHMidxSCdG4ndkTOHHpoomWe/4xkvHkEOncwjYIw== dependencies: - "@babel/types" "^7.22.15" + "@babel/types" "^7.22.5" "@jridgewell/gen-mapping" "^0.3.2" "@jridgewell/trace-mapping" "^0.3.17" jsesc "^2.5.1" -"@babel/generator@^7.22.7", "@babel/generator@^7.22.9": - version "7.22.9" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.22.9.tgz#572ecfa7a31002fa1de2a9d91621fd895da8493d" - integrity sha512-KtLMbmicyuK2Ak/FTCJVbDnkN1SlT8/kceFTiuDiiRUUSMnHMidxSCdG4ndkTOHHpoomWe/4xkvHkEOncwjYIw== +"@babel/generator@^7.23.0": + version "7.23.0" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.23.0.tgz#df5c386e2218be505b34837acbcb874d7a983420" + integrity sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g== dependencies: - "@babel/types" "^7.22.5" + "@babel/types" "^7.23.0" "@jridgewell/gen-mapping" "^0.3.2" "@jridgewell/trace-mapping" "^0.3.17" jsesc "^2.5.1" @@ -271,22 +271,6 @@ resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.5.tgz#f06dd41b7c1f44e1f8da6c4055b41ab3a09a7e98" integrity sha512-XGmhECfVA/5sAt+H+xpSg0mfrHq6FzNr9Oxh7PSEBBRUb/mL7Kz3NICXb194rCqAEdxkhPT1a88teizAFyvk8Q== -"@babel/helper-function-name@^7.19.0": - version "7.19.0" - resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.19.0.tgz#941574ed5390682e872e52d3f38ce9d1bef4648c" - integrity sha512-WAwHBINyrpqywkUH0nTnNgI5ina5TFn85HKS0pbPDfxFfhyR/aNQEn4hGi1P1JyT//I0t4OgXUlofzWILRvS5w== - dependencies: - "@babel/template" "^7.18.10" - "@babel/types" "^7.19.0" - -"@babel/helper-function-name@^7.21.0": - version "7.21.0" - resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.21.0.tgz#d552829b10ea9f120969304023cd0645fa00b1b4" - integrity sha512-HfK1aMRanKHpxemaY2gqBmL04iAPOPRj7DxtNbiDOrJK+gdwkiNRVpCpUJYbUT+aZyemKN8brqTOxzCaG6ExRg== - dependencies: - "@babel/template" "^7.20.7" - "@babel/types" "^7.21.0" - "@babel/helper-function-name@^7.22.5": version "7.22.5" resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.22.5.tgz#ede300828905bb15e582c037162f99d5183af1be" @@ -295,12 +279,13 @@ "@babel/template" "^7.22.5" "@babel/types" "^7.22.5" -"@babel/helper-hoist-variables@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz#d4d2c8fb4baeaa5c68b99cc8245c56554f926678" - integrity sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q== +"@babel/helper-function-name@^7.23.0": + version "7.23.0" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz#1f9a3cdbd5b2698a670c30d2735f9af95ed52759" + integrity sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw== dependencies: - "@babel/types" "^7.18.6" + "@babel/template" "^7.22.15" + "@babel/types" "^7.23.0" "@babel/helper-hoist-variables@^7.22.5": version "7.22.5" @@ -568,20 +553,20 @@ chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.13", "@babel/parser@^7.20.7": +"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7": version "7.20.15" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.20.15.tgz#eec9f36d8eaf0948bb88c87a46784b5ee9fd0c89" integrity sha512-DI4a1oZuf8wC+oAJA9RW6ga3Zbe8RZFt7kD9i4qAspz3I/yHet1VvC3DiSy/fsUvv5pvJuNPh0LPOdCcqinDPg== -"@babel/parser@^7.21.5", "@babel/parser@^7.21.8": +"@babel/parser@^7.21.8": version "7.21.9" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.21.9.tgz#ab18ea3b85b4bc33ba98a8d4c2032c557d23cf14" integrity sha512-q5PNg/Bi1OpGgx5jYlvWZwAorZepEudDMCLtj967aeS7WMont7dUZI46M2XwcIQqvUlMxWfdLFu4S/qSxeUu5g== -"@babel/parser@^7.22.16": - version "7.22.16" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.22.16.tgz#180aead7f247305cce6551bea2720934e2fa2c95" - integrity sha512-+gPfKv8UWeKKeJTUxe59+OobVcrYHETCsORl61EmSkmgymguYk/X5bp7GuUIXaFsc6y++v8ZxPsLSSuujqDphA== +"@babel/parser@^7.22.15", "@babel/parser@^7.23.0": + version "7.23.0" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.23.0.tgz#da950e622420bf96ca0d0f2909cdddac3acd8719" + integrity sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw== "@babel/parser@^7.22.5", "@babel/parser@^7.22.7": version "7.22.7" @@ -1356,7 +1341,7 @@ dependencies: regenerator-runtime "^0.13.11" -"@babel/template@^7.18.10", "@babel/template@^7.20.7", "@babel/template@^7.3.3": +"@babel/template@^7.20.7", "@babel/template@^7.3.3": version "7.20.7" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.20.7.tgz#a15090c2839a83b02aa996c0b4994005841fd5a8" integrity sha512-8SegXApWe6VoNw0r9JHpSteLKTpTiLZ4rMlGIm9JQ18KiCtyQiAMEazujAHrUS5flrcqYZa75ukev3P6QmUwUw== @@ -1365,6 +1350,15 @@ "@babel/parser" "^7.20.7" "@babel/types" "^7.20.7" +"@babel/template@^7.22.15": + version "7.22.15" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.22.15.tgz#09576efc3830f0430f4548ef971dde1350ef2f38" + integrity sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w== + dependencies: + "@babel/code-frame" "^7.22.13" + "@babel/parser" "^7.22.15" + "@babel/types" "^7.22.15" + "@babel/template@^7.22.5": version "7.22.5" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.22.5.tgz#0c8c4d944509875849bd0344ff0050756eefc6ec" @@ -1374,71 +1368,23 @@ "@babel/parser" "^7.22.5" "@babel/types" "^7.22.5" -"@babel/traverse@^7.20.10", "@babel/traverse@^7.20.12", "@babel/traverse@^7.20.13": - version "7.20.13" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.20.13.tgz#817c1ba13d11accca89478bd5481b2d168d07473" - integrity sha512-kMJXfF0T6DIS9E8cgdLCSAL+cuCK+YEZHWiLK0SXpTo8YRj5lpJu3CDNKiIBCne4m9hhTIqUg6SYTAI39tAiVQ== - dependencies: - "@babel/code-frame" "^7.18.6" - "@babel/generator" "^7.20.7" - "@babel/helper-environment-visitor" "^7.18.9" - "@babel/helper-function-name" "^7.19.0" - "@babel/helper-hoist-variables" "^7.18.6" - "@babel/helper-split-export-declaration" "^7.18.6" - "@babel/parser" "^7.20.13" - "@babel/types" "^7.20.7" - debug "^4.1.0" - globals "^11.1.0" - -"@babel/traverse@^7.21.5", "@babel/traverse@^7.7.2": - version "7.21.5" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.21.5.tgz#ad22361d352a5154b498299d523cf72998a4b133" - integrity sha512-AhQoI3YjWi6u/y/ntv7k48mcrCXmus0t79J9qPNlk/lAsFlCiJ047RmbfMOawySTHtywXhbXgpx/8nXMYd+oFw== - dependencies: - "@babel/code-frame" "^7.21.4" - "@babel/generator" "^7.21.5" - "@babel/helper-environment-visitor" "^7.21.5" - "@babel/helper-function-name" "^7.21.0" - "@babel/helper-hoist-variables" "^7.18.6" - "@babel/helper-split-export-declaration" "^7.18.6" - "@babel/parser" "^7.21.5" - "@babel/types" "^7.21.5" - debug "^4.1.0" - globals "^11.1.0" - -"@babel/traverse@^7.22.6", "@babel/traverse@^7.22.8": - version "7.22.8" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.22.8.tgz#4d4451d31bc34efeae01eac222b514a77aa4000e" - integrity sha512-y6LPR+wpM2I3qJrsheCTwhIinzkETbplIgPBbwvqPKc+uljeA5gP+3nP8irdYt1mjQaDnlIcG+dw8OjAco4GXw== - dependencies: - "@babel/code-frame" "^7.22.5" - "@babel/generator" "^7.22.7" - "@babel/helper-environment-visitor" "^7.22.5" - "@babel/helper-function-name" "^7.22.5" - "@babel/helper-hoist-variables" "^7.22.5" - "@babel/helper-split-export-declaration" "^7.22.6" - "@babel/parser" "^7.22.7" - "@babel/types" "^7.22.5" - debug "^4.1.0" - globals "^11.1.0" - -"@babel/traverse@^7.4.5": - version "7.22.20" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.22.20.tgz#db572d9cb5c79e02d83e5618b82f6991c07584c9" - integrity sha512-eU260mPZbU7mZ0N+X10pxXhQFMGTeLb9eFS0mxehS8HZp9o1uSnFeWQuG1UPrlxgA7QoUzFhOnilHDp0AXCyHw== +"@babel/traverse@^7.20.10", "@babel/traverse@^7.20.12", "@babel/traverse@^7.20.13", "@babel/traverse@^7.21.5", "@babel/traverse@^7.22.6", "@babel/traverse@^7.22.8", "@babel/traverse@^7.4.5", "@babel/traverse@^7.7.2": + version "7.23.2" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.23.2.tgz#329c7a06735e144a506bdb2cad0268b7f46f4ad8" + integrity sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw== dependencies: "@babel/code-frame" "^7.22.13" - "@babel/generator" "^7.22.15" + "@babel/generator" "^7.23.0" "@babel/helper-environment-visitor" "^7.22.20" - "@babel/helper-function-name" "^7.22.5" + "@babel/helper-function-name" "^7.23.0" "@babel/helper-hoist-variables" "^7.22.5" "@babel/helper-split-export-declaration" "^7.22.6" - "@babel/parser" "^7.22.16" - "@babel/types" "^7.22.19" + "@babel/parser" "^7.23.0" + "@babel/types" "^7.23.0" debug "^4.1.0" globals "^11.1.0" -"@babel/types@^7.0.0", "@babel/types@^7.18.6", "@babel/types@^7.19.0", "@babel/types@^7.20.2", "@babel/types@^7.20.7", "@babel/types@^7.3.0", "@babel/types@^7.3.3": +"@babel/types@^7.0.0", "@babel/types@^7.18.6", "@babel/types@^7.20.2", "@babel/types@^7.20.7", "@babel/types@^7.3.0", "@babel/types@^7.3.3": version "7.20.7" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.20.7.tgz#54ec75e252318423fc07fb644dc6a58a64c09b7f" integrity sha512-69OnhBxSSgK0OzTJai4kyPDiKTIe3j+ctaHdIGVbRahTLAT7L3R9oeXHC2aVSuGYt3cVnoAMDmOCgJ2yaiLMvg== @@ -1447,15 +1393,6 @@ "@babel/helper-validator-identifier" "^7.19.1" to-fast-properties "^2.0.0" -"@babel/types@^7.21.0", "@babel/types@^7.21.4", "@babel/types@^7.21.5": - version "7.21.5" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.21.5.tgz#18dfbd47c39d3904d5db3d3dc2cc80bedb60e5b6" - integrity sha512-m4AfNvVF2mVC/F7fDEdH2El3HzUg9It/XsCxZiOTTA3m3qYfcSVSbTfM6Q9xG+hYDniZssYhlXKKUMD5m8tF4Q== - dependencies: - "@babel/helper-string-parser" "^7.21.5" - "@babel/helper-validator-identifier" "^7.19.1" - to-fast-properties "^2.0.0" - "@babel/types@^7.21.3", "@babel/types@^7.22.5", "@babel/types@^7.4.4": version "7.22.5" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.22.5.tgz#cd93eeaab025880a3a47ec881f4b096a5b786fbe" @@ -1465,7 +1402,16 @@ "@babel/helper-validator-identifier" "^7.22.5" to-fast-properties "^2.0.0" -"@babel/types@^7.22.15", "@babel/types@^7.22.19": +"@babel/types@^7.21.4", "@babel/types@^7.21.5": + version "7.21.5" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.21.5.tgz#18dfbd47c39d3904d5db3d3dc2cc80bedb60e5b6" + integrity sha512-m4AfNvVF2mVC/F7fDEdH2El3HzUg9It/XsCxZiOTTA3m3qYfcSVSbTfM6Q9xG+hYDniZssYhlXKKUMD5m8tF4Q== + dependencies: + "@babel/helper-string-parser" "^7.21.5" + "@babel/helper-validator-identifier" "^7.19.1" + to-fast-properties "^2.0.0" + +"@babel/types@^7.22.15": version "7.22.19" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.22.19.tgz#7425343253556916e440e662bb221a93ddb75684" integrity sha512-P7LAw/LbojPzkgp5oznjE6tQEIWbp4PkkfrZDINTro9zgBRtI324/EYsiSI7lhPbpIQ+DCeR2NNmMWANGGfZsg== @@ -1474,6 +1420,15 @@ "@babel/helper-validator-identifier" "^7.22.19" to-fast-properties "^2.0.0" +"@babel/types@^7.23.0": + version "7.23.0" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.23.0.tgz#8c1f020c9df0e737e4e247c0619f58c68458aaeb" + integrity sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg== + dependencies: + "@babel/helper-string-parser" "^7.22.5" + "@babel/helper-validator-identifier" "^7.22.20" + to-fast-properties "^2.0.0" + "@bcoe/v8-coverage@^0.2.3": version "0.2.3" resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" From 107a30d7bd0477a14db8f4160142515d7f7105b3 Mon Sep 17 00:00:00 2001 From: Andrei Date: Tue, 17 Oct 2023 23:26:14 +0700 Subject: [PATCH 6/7] fix: fix lido stats data --- pages/api/short-lido-stats.ts | 2 +- utilsApi/getLidoHoldersViaSubgraphs.ts | 15 +++++---------- utilsApi/getTotalStaked.ts | 17 ++++++++--------- 3 files changed, 14 insertions(+), 20 deletions(-) diff --git a/pages/api/short-lido-stats.ts b/pages/api/short-lido-stats.ts index 30b1390d2..af5178f0e 100644 --- a/pages/api/short-lido-stats.ts +++ b/pages/api/short-lido-stats.ts @@ -35,7 +35,7 @@ const shortLidoStats: API = async (req, res) => { } else { const [lidoHolders, totalStaked, stEthPrice] = await parallelizePromises([ getLidoHoldersViaSubgraphs(chainId), - getTotalStaked(), + getTotalStaked(chainId), getStEthPrice(), ]); diff --git a/utilsApi/getLidoHoldersViaSubgraphs.ts b/utilsApi/getLidoHoldersViaSubgraphs.ts index e889008be..f9b3889c3 100644 --- a/utilsApi/getLidoHoldersViaSubgraphs.ts +++ b/utilsApi/getLidoHoldersViaSubgraphs.ts @@ -23,10 +23,7 @@ interface LidoHolders extends Response { }; } -const cache = new Cache< - typeof CACHE_LIDO_HOLDERS_VIA_SUBGRAPHS_KEY, - LidoHolders ->(); +const cache = new Cache(); type GetLidoHoldersViaSubgraphs = ( chainId: SubgraphChains, @@ -35,6 +32,8 @@ type GetLidoHoldersViaSubgraphs = ( export const getLidoHoldersViaSubgraphs: GetLidoHoldersViaSubgraphs = async ( chainId: SubgraphChains, ) => { + const cacheKey = `${CACHE_LIDO_HOLDERS_VIA_SUBGRAPHS_KEY}_${chainId}`; + console.debug('[getLidoHoldersViaSubgraphs] Started fetching... '); const query = ` query { @@ -72,15 +71,11 @@ export const getLidoHoldersViaSubgraphs: GetLidoHoldersViaSubgraphs = async ( console.debug('[getLidoHoldersViaSubgraphs] Lido holders:', responseJsoned); - cache.put( - CACHE_LIDO_HOLDERS_VIA_SUBGRAPHS_KEY, - responseJsoned, - CACHE_LIDO_HOLDERS_VIA_SUBGRAPHS_TTL, - ); + cache.put(cacheKey, responseJsoned, CACHE_LIDO_HOLDERS_VIA_SUBGRAPHS_TTL); return responseJsoned; } catch (error) { - const data = cache.get(CACHE_LIDO_HOLDERS_VIA_SUBGRAPHS_KEY); + const data = cache.get(cacheKey); if (data) { console.error(`${SUBGRAPH_ERROR_MESSAGE} Using long-term cache...`); diff --git a/utilsApi/getTotalStaked.ts b/utilsApi/getTotalStaked.ts index 6f9f023d3..89da0e2ab 100644 --- a/utilsApi/getTotalStaked.ts +++ b/utilsApi/getTotalStaked.ts @@ -1,26 +1,25 @@ import { formatEther } from '@ethersproject/units'; import { getStaticRpcBatchProvider } from './rpcProviders'; import { StethAbiFactory } from '@lido-sdk/contracts'; -import { getTokenAddress, TOKENS, CHAINS } from '@lido-sdk/constants'; +import { getTokenAddress, TOKENS } from '@lido-sdk/constants'; +import { CHAINS } from 'utils/chains'; import { HEALTHY_RPC_SERVICES_ARE_OVER } from 'config'; import { rpcUrls } from './rpcUrls'; -export const getTotalStaked = async (): Promise => { - const urls = rpcUrls[CHAINS.Mainnet]; - return getTotalStakedWithFallbacks(urls, 0); +export const getTotalStaked = async (chainId?: CHAINS): Promise => { + const urls = rpcUrls[chainId || CHAINS.Mainnet]; + return getTotalStakedWithFallbacks(urls, 0, chainId); }; const getTotalStakedWithFallbacks = async ( urls: Array, urlIndex: number, + chainId = CHAINS.Mainnet, ): Promise => { try { - const staticProvider = getStaticRpcBatchProvider( - CHAINS.Mainnet, - urls[urlIndex], - ); + const staticProvider = getStaticRpcBatchProvider(chainId, urls[urlIndex]); - const stethAddress = getTokenAddress(CHAINS.Mainnet, TOKENS.STETH); + const stethAddress = getTokenAddress(chainId as number, TOKENS.STETH); const stethContract = StethAbiFactory.connect(stethAddress, staticProvider); const totalSupplyStWei = await stethContract.totalSupply(); From fafbb6dabbd75e0d3d11e694a5626745bc2035a2 Mon Sep 17 00:00:00 2001 From: Andrei Date: Tue, 17 Oct 2023 23:30:08 +0700 Subject: [PATCH 7/7] fix: update args --- utilsApi/getTotalStaked.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/utilsApi/getTotalStaked.ts b/utilsApi/getTotalStaked.ts index 89da0e2ab..b69601d70 100644 --- a/utilsApi/getTotalStaked.ts +++ b/utilsApi/getTotalStaked.ts @@ -6,8 +6,10 @@ import { CHAINS } from 'utils/chains'; import { HEALTHY_RPC_SERVICES_ARE_OVER } from 'config'; import { rpcUrls } from './rpcUrls'; -export const getTotalStaked = async (chainId?: CHAINS): Promise => { - const urls = rpcUrls[chainId || CHAINS.Mainnet]; +export const getTotalStaked = async ( + chainId = CHAINS.Mainnet, +): Promise => { + const urls = rpcUrls[chainId]; return getTotalStakedWithFallbacks(urls, 0, chainId); }; @@ -32,6 +34,6 @@ const getTotalStakedWithFallbacks = async ( console.error(error); throw new Error(error); } - return await getTotalStakedWithFallbacks(urls, urlIndex + 1); + return await getTotalStakedWithFallbacks(urls, urlIndex + 1, chainId); } };