From a5312d8ed9b355f909323c19bb69a39c303ebcb2 Mon Sep 17 00:00:00 2001 From: Daniel Somoza Date: Wed, 11 Oct 2023 14:54:48 +0200 Subject: [PATCH] Fix auth-kit tests --- .../tests/e2e/getSafeDelegates.test.ts | 2 +- .../tests/e2e/removeSafeDelegate.test.ts | 2 +- packages/api-kit/tests/endpoint/index.test.ts | 3 +- packages/auth-kit/example/package.json | 2 +- packages/auth-kit/example/yarn.lock | 56 +++++++++++-------- packages/auth-kit/src/AuthKitBasePack.ts | 2 +- 6 files changed, 37 insertions(+), 30 deletions(-) diff --git a/packages/api-kit/tests/e2e/getSafeDelegates.test.ts b/packages/api-kit/tests/e2e/getSafeDelegates.test.ts index 30a43686a..0044e37b1 100644 --- a/packages/api-kit/tests/e2e/getSafeDelegates.test.ts +++ b/packages/api-kit/tests/e2e/getSafeDelegates.test.ts @@ -1,4 +1,4 @@ -import { Signer } from '@ethersproject/abstract-signer' +import { Signer } from 'ethers' import SafeApiKit, { DeleteSafeDelegateProps } from '@safe-global/api-kit/index' import chai from 'chai' import chaiAsPromised from 'chai-as-promised' diff --git a/packages/api-kit/tests/e2e/removeSafeDelegate.test.ts b/packages/api-kit/tests/e2e/removeSafeDelegate.test.ts index 75325009a..7e2601227 100644 --- a/packages/api-kit/tests/e2e/removeSafeDelegate.test.ts +++ b/packages/api-kit/tests/e2e/removeSafeDelegate.test.ts @@ -1,4 +1,4 @@ -import { Signer } from '@ethersproject/abstract-signer' +import { Signer } from 'ethers' import SafeApiKit, { DeleteSafeDelegateProps } from '@safe-global/api-kit/index' import chai from 'chai' import chaiAsPromised from 'chai-as-promised' diff --git a/packages/api-kit/tests/endpoint/index.test.ts b/packages/api-kit/tests/endpoint/index.test.ts index def83a1a9..bf189667b 100644 --- a/packages/api-kit/tests/endpoint/index.test.ts +++ b/packages/api-kit/tests/endpoint/index.test.ts @@ -1,5 +1,4 @@ -import { getDefaultProvider } from '@ethersproject/providers' -import { Wallet } from '@ethersproject/wallet' +import { getDefaultProvider, Wallet } from 'ethers' import SafeApiKit, { AddSafeDelegateProps, DeleteSafeDelegateProps, diff --git a/packages/auth-kit/example/package.json b/packages/auth-kit/example/package.json index 7c2a84585..eeaf60400 100644 --- a/packages/auth-kit/example/package.json +++ b/packages/auth-kit/example/package.json @@ -13,7 +13,7 @@ "@emotion/styled": "^11.10.5", "@mui/material": "^5.11.7", "@safe-global/safe-react-components": "^2.0.1", - "ethers": "^6.0.3", + "ethers": "^6.7.1", "react": "^18.2.0", "react-dom": "^18.2.0" }, diff --git a/packages/auth-kit/example/yarn.lock b/packages/auth-kit/example/yarn.lock index 7cddedf80..ecdeaf9ff 100644 --- a/packages/auth-kit/example/yarn.lock +++ b/packages/auth-kit/example/yarn.lock @@ -2,10 +2,10 @@ # yarn lockfile v1 -"@adraffy/ens-normalize@1.8.9": - version "1.8.9" - resolved "https://registry.yarnpkg.com/@adraffy/ens-normalize/-/ens-normalize-1.8.9.tgz#67b3acadebbb551669c9a1da15fac951db795b85" - integrity sha512-93OmGCV0vO8+JQ3FHG+gZk/MPHzzMPDRiCiFcCQNTCnHaaxsacO3ScTPGlu2wX2dOtgfalbchPcw1cOYYjHCYQ== +"@adraffy/ens-normalize@1.10.0": + version "1.10.0" + resolved "https://registry.yarnpkg.com/@adraffy/ens-normalize/-/ens-normalize-1.10.0.tgz#d2a39395c587e092d77cbbc80acf956a54f38bf7" + integrity sha512-nA9XHtlAkYfJxY7bce8DcN7eKxWWCWkU+1GR9d+U6MbNpfwQp8TI7vqOsBsMcHoT4mBu2kypKoSKnghEzOOq5Q== "@ampproject/remapping@^2.1.0": version "2.2.0" @@ -633,15 +633,17 @@ prop-types "^15.8.1" react-is "^18.2.0" -"@noble/hashes@1.1.2": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.1.2.tgz#e9e035b9b166ca0af657a7848eb2718f0f22f183" - integrity sha512-KYRCASVTv6aeUi1tsF8/vpyR7zpfs3FUzy2Jqm+MU+LmUKhQ0y2FpfwqkCcxSg2ua4GALJd8k2R76WxwZGbQpA== +"@noble/curves@1.2.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.2.0.tgz#92d7e12e4e49b23105a2555c6984d41733d65c35" + integrity sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw== + dependencies: + "@noble/hashes" "1.3.2" -"@noble/secp256k1@1.7.1": - version "1.7.1" - resolved "https://registry.yarnpkg.com/@noble/secp256k1/-/secp256k1-1.7.1.tgz#b251c70f824ce3ca7f8dc3df08d58f005cc0507c" - integrity sha512-hOUk6AyBFmqVrv7k5WAw/LpszxVbj9gGN4JRkIX52fdFAj1UA61KXmZDvqVEm+pOyec3+fIeZB02LYa/pWOArw== +"@noble/hashes@1.3.2": + version "1.3.2" + resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.3.2.tgz#6f26dbc8fbc7205873ce3cee2f690eba0d421b39" + integrity sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ== "@popperjs/core@^2.11.6": version "2.11.6" @@ -691,6 +693,11 @@ resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.0.tgz#5fb2e536c1ae9bf35366eed879e827fa59ca41c2" integrity sha512-WulqXMDUTYAXCjZnk6JtIHPigp55cVtDgDrO2gHRwhyJto21+1zbVCtOYB2L1F9w4qCQ0rOGWBnBe0FNTiEJIQ== +"@types/node@18.15.13": + version "18.15.13" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.15.13.tgz#f64277c341150c979e42b00e4ac289290c9df469" + integrity sha512-N+0kuo9KgrUQ1Sn/ifDXsvg0TTleP7rIy4zOBGECxAljqvqfqpTfzx0Q1NUedOixRMBfe2Whhb056a42cWs26Q== + "@types/parse-json@^4.0.0": version "4.0.0" resolved "https://registry.yarnpkg.com/@types/parse-json/-/parse-json-4.0.0.tgz#2f8bb441434d163b35fb8ffdccd7138927ffb8c0" @@ -747,10 +754,10 @@ magic-string "^0.27.0" react-refresh "^0.14.0" -aes-js@4.0.0-beta.3: - version "4.0.0-beta.3" - resolved "https://registry.yarnpkg.com/aes-js/-/aes-js-4.0.0-beta.3.tgz#da2253f0ff03a0b3a9e445c8cbdf78e7fda7d48c" - integrity sha512-/xJX0/VTPcbc5xQE2VUP91y1xN8q/rDfhEzLm+vLc3hYvb5+qHCnpJRuFcrKn63zumK/sCwYYzhG8HP78JYSTA== +aes-js@4.0.0-beta.5: + version "4.0.0-beta.5" + resolved "https://registry.yarnpkg.com/aes-js/-/aes-js-4.0.0-beta.5.tgz#8d2452c52adedebc3a3e28465d858c11ca315873" + integrity sha512-G965FqalsNyrPqgEGON7nIx1e/OVENSgiEIzyC63haUMuvNnwIgIjMs52hlTCKhkBny7A2ORNlfY9Zu+jmGk1Q== ansi-styles@^3.2.1: version "3.2.1" @@ -944,15 +951,16 @@ ethereum-blockies-base64@^1.0.2: dependencies: pnglib "0.0.1" -ethers@^6.0.3: - version "6.0.3" - resolved "https://registry.yarnpkg.com/ethers/-/ethers-6.0.3.tgz#00a525cc70306624dfc88d6438addcb001eb7a42" - integrity sha512-ECUt+AlY80eLA/XvOgy4/K5Pq5BsMzlKKcSuUXOgp4k6d3tcDphEiz+Fs3zut/zYQVgqLgm3f8YtCJEEtzl8kA== +ethers@^6.7.1: + version "6.8.0" + resolved "https://registry.yarnpkg.com/ethers/-/ethers-6.8.0.tgz#0a26f57e96fd697cefcfcef464e0c325689d1daf" + integrity sha512-zrFbmQRlraM+cU5mE4CZTLBurZTs2gdp2ld0nG/f3ecBK+x6lZ69KSxBqZ4NjclxwfTxl5LeNufcBbMsTdY53Q== dependencies: - "@adraffy/ens-normalize" "1.8.9" - "@noble/hashes" "1.1.2" - "@noble/secp256k1" "1.7.1" - aes-js "4.0.0-beta.3" + "@adraffy/ens-normalize" "1.10.0" + "@noble/curves" "1.2.0" + "@noble/hashes" "1.3.2" + "@types/node" "18.15.13" + aes-js "4.0.0-beta.5" tslib "2.4.0" ws "8.5.0" diff --git a/packages/auth-kit/src/AuthKitBasePack.ts b/packages/auth-kit/src/AuthKitBasePack.ts index ef2bc30ff..b334a3c36 100644 --- a/packages/auth-kit/src/AuthKitBasePack.ts +++ b/packages/auth-kit/src/AuthKitBasePack.ts @@ -1,4 +1,4 @@ -import ethers, { Eip1193Provider } from 'ethers' +import { ethers, Eip1193Provider } from 'ethers' import SafeApiKit from '@safe-global/api-kit' import { EthersAdapter } from '@safe-global/protocol-kit'