From fba1373b162e8211c74edfa2d55e5ff6f2cebade Mon Sep 17 00:00:00 2001 From: Vignesh Mohankumar Date: Fri, 24 Feb 2023 11:44:29 -0500 Subject: [PATCH] fix: support eip-712 signing in gnosis safe connector (#762) * fix: support eip-712 signing in gnosis safe connector * yarn lock fix --- packages/gnosis-safe/package.json | 4 +-- packages/gnosis-safe/src/index.ts | 12 ++++---- yarn.lock | 48 +++++++++++++++---------------- 3 files changed, 32 insertions(+), 32 deletions(-) diff --git a/packages/gnosis-safe/package.json b/packages/gnosis-safe/package.json index 6031d9b..e715350 100644 --- a/packages/gnosis-safe/package.json +++ b/packages/gnosis-safe/package.json @@ -24,8 +24,8 @@ "start": "tsc --watch" }, "dependencies": { - "@gnosis.pm/safe-apps-provider": "^0.12.0", - "@gnosis.pm/safe-apps-sdk": "^7.6.0", + "@safe-global/safe-apps-provider": "^0.16.0", + "@safe-global/safe-apps-sdk": "^7.10.0", "@web3-react/types": "^8.1.0-beta.0" } } diff --git a/packages/gnosis-safe/src/index.ts b/packages/gnosis-safe/src/index.ts index 3cc6c2c..111a9fa 100644 --- a/packages/gnosis-safe/src/index.ts +++ b/packages/gnosis-safe/src/index.ts @@ -1,6 +1,6 @@ -import type { SafeAppProvider } from '@gnosis.pm/safe-apps-provider' -import type SafeAppsSDK from '@gnosis.pm/safe-apps-sdk' -import type { Opts } from '@gnosis.pm/safe-apps-sdk' +import type { SafeAppProvider } from '@safe-global/safe-apps-provider' +import type SafeAppsSDK from '@safe-global/safe-apps-sdk' +import type { Opts } from '@safe-global/safe-apps-sdk' import type { Actions } from '@web3-react/types' import { Connector } from '@web3-react/types' @@ -13,7 +13,7 @@ export class NoSafeContext extends Error { } /** - * @param options - Options to pass to `@gnosis.pm/safe-apps-sdk`. + * @param options - Options to pass to `@safe-global/safe-apps-sdk`. */ export interface GnosisSafeConstructorArgs { actions: Actions @@ -57,11 +57,11 @@ export class GnosisSafe extends Connector { if (this.eagerConnection) return // kick off import early to minimize waterfalls - const SafeAppProviderPromise = import('@gnosis.pm/safe-apps-provider').then( + const SafeAppProviderPromise = import('@safe-global/safe-apps-provider').then( ({ SafeAppProvider }) => SafeAppProvider ) - await (this.eagerConnection = import('@gnosis.pm/safe-apps-sdk').then(async (m) => { + await (this.eagerConnection = import('@safe-global/safe-apps-sdk').then(async (m) => { this.sdk = new m.default(this.options) const safe = await Promise.race([ diff --git a/yarn.lock b/yarn.lock index 9d1dbc7..417ffae 100644 --- a/yarn.lock +++ b/yarn.lock @@ -719,29 +719,6 @@ resolved "https://registry.yarnpkg.com/@gar/promisify/-/promisify-1.1.2.tgz#30aa825f11d438671d585bd44e7fd564535fc210" integrity sha512-82cpyJyKRoQoRi+14ibCeGPu0CwypgtBAdBhq1WfvagpCZNKqwXbKwXllYSMG91DhmG4jt9gN8eP6lGOtozuaw== -"@gnosis.pm/safe-apps-provider@^0.12.0": - version "0.12.0" - resolved "https://registry.yarnpkg.com/@gnosis.pm/safe-apps-provider/-/safe-apps-provider-0.12.0.tgz#bf0b7de614627bd07d4023a3d0e3ee94d109ca34" - integrity sha512-HfBpbp4KC1cY10EgTgra2XGtPC9t7PES1OrUQvZHZdbp/2CdmlwrrmXCBfhpxmEr4C2DmGqoGBBZWPeli6rctA== - dependencies: - "@gnosis.pm/safe-apps-sdk" "7.6.0" - events "^3.3.0" - -"@gnosis.pm/safe-apps-sdk@7.6.0", "@gnosis.pm/safe-apps-sdk@^7.6.0": - version "7.6.0" - resolved "https://registry.yarnpkg.com/@gnosis.pm/safe-apps-sdk/-/safe-apps-sdk-7.6.0.tgz#fdd8fa57eb3d6be3ba384ee51cb5b2f5f6416fbc" - integrity sha512-2MFdcNu/n2pioeX2TiXMmwtxvhl5SM8Y2RapDF8YxF11naubKvVXIg5KDJfmvGfXCn7wyqjLxkBcUkMPFbcS8w== - dependencies: - "@gnosis.pm/safe-react-gateway-sdk" "^3.1.3" - ethers "^5.6.8" - -"@gnosis.pm/safe-react-gateway-sdk@^3.1.3": - version "3.1.3" - resolved "https://registry.yarnpkg.com/@gnosis.pm/safe-react-gateway-sdk/-/safe-react-gateway-sdk-3.1.3.tgz#a4d3faf84a02de1a961b2f42b6b5398ff3a61f7b" - integrity sha512-o/U2hN5RoK8sa6UT5hALc+4yveJ5qctMxCHe0VBJ5IE2KHqqwHrFteOVcrkunmgb5V5U8GfZVYhehuHDVN8WMA== - dependencies: - cross-fetch "^3.1.5" - "@humanwhocodes/config-array@^0.9.2": version "0.9.2" resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.9.2.tgz#68be55c737023009dfc5fe245d51181bb6476914" @@ -2035,6 +2012,29 @@ resolved "https://registry.yarnpkg.com/@rushstack/eslint-patch/-/eslint-patch-1.2.0.tgz#8be36a1f66f3265389e90b5f9c9962146758f728" integrity sha512-sXo/qW2/pAcmT43VoRKOJbDOfV3cYpq3szSVfIThQXNt+E4DfKj361vaAt3c88U5tPUxzEswam7GW48PJqtKAg== +"@safe-global/safe-apps-provider@^0.16.0": + version "0.16.0" + resolved "https://registry.yarnpkg.com/@safe-global/safe-apps-provider/-/safe-apps-provider-0.16.0.tgz#55cb8ef168900fa13d4f4508a99ef00b565bf55d" + integrity sha512-oeRlvU+2hjFx/7EbskGq30kkwL2hyfdseZZZYf6na/xD85mZ59zKO81lBxZcWnvofJFqjqtScz84PAKth9Sq2g== + dependencies: + "@safe-global/safe-apps-sdk" "7.10.0" + events "^3.3.0" + +"@safe-global/safe-apps-sdk@7.10.0", "@safe-global/safe-apps-sdk@^7.10.0": + version "7.10.0" + resolved "https://registry.yarnpkg.com/@safe-global/safe-apps-sdk/-/safe-apps-sdk-7.10.0.tgz#e75fc581126f27c52ec2601da51bca5eb99b61f4" + integrity sha512-is0QAHVoGkP06YfOPcp4X3/YUEA3wRdgFUyKZ4rT47uOEnzxA9Sm8BFJrIZqZOjjqC+aJXRMF0cE2qucS953rg== + dependencies: + "@safe-global/safe-gateway-typescript-sdk" "^3.5.3" + ethers "^5.7.2" + +"@safe-global/safe-gateway-typescript-sdk@^3.5.3": + version "3.7.0" + resolved "https://registry.yarnpkg.com/@safe-global/safe-gateway-typescript-sdk/-/safe-gateway-typescript-sdk-3.7.0.tgz#2af52f1bc73759b1b6a549fed598781c8c5fce72" + integrity sha512-3BvlUgp0oZ1Zkn7nG3wY1jvCEE4t530BjKcaa3r0qsf0whf/ez/0gmQwk7DTOGmVmvOfjj6HHikxnrUCCX+/3Q== + dependencies: + cross-fetch "^3.1.5" + "@sinonjs/commons@^1.7.0": version "1.8.3" resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-1.8.3.tgz#3802ddd21a50a949b6721ddd72da36e67e7f1b2d" @@ -4677,7 +4677,7 @@ ethereumjs-util@^6.0.0: ethjs-util "0.1.6" rlp "^2.2.3" -ethers@^5.6.8, ethers@^5.7.0: +ethers@^5.7.0, ethers@^5.7.2: version "5.7.2" resolved "https://registry.yarnpkg.com/ethers/-/ethers-5.7.2.tgz#3a7deeabbb8c030d4126b24f84e525466145872e" integrity sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg==