Skip to content

Commit

Permalink
fix: support eip-712 signing in gnosis safe connector (#762)
Browse files Browse the repository at this point in the history
* fix: support eip-712 signing in gnosis safe connector

* yarn lock fix
  • Loading branch information
vm authored Feb 24, 2023
1 parent 5645009 commit fba1373
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 32 deletions.
4 changes: 2 additions & 2 deletions packages/gnosis-safe/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
12 changes: 6 additions & 6 deletions packages/gnosis-safe/src/index.ts
Original file line number Diff line number Diff line change
@@ -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'

Expand All @@ -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
Expand Down Expand Up @@ -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([
Expand Down
48 changes: 24 additions & 24 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]", "@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"
Expand Down Expand Up @@ -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/[email protected]", "@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"
Expand Down Expand Up @@ -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==
Expand Down

0 comments on commit fba1373

Please sign in to comment.