diff --git a/.changeset/cold-roses-glow.md b/.changeset/cold-roses-glow.md new file mode 100644 index 0000000000..25dd3efdfc --- /dev/null +++ b/.changeset/cold-roses-glow.md @@ -0,0 +1,8 @@ +--- +"@wagmi/connectors": patch +"@wagmi/core": patch +"wagmi": patch +"@wagmi/vue": patch +--- + +Updated `@safe-global/safe-apps-sdk` + `@safe-global/safe-apps-provider` dependencies. diff --git a/packages/connectors/package.json b/packages/connectors/package.json index 2f5de084e3..e1574307c8 100644 --- a/packages/connectors/package.json +++ b/packages/connectors/package.json @@ -47,8 +47,8 @@ "dependencies": { "@coinbase/wallet-sdk": "4.0.4", "@metamask/sdk": "0.26.4", - "@safe-global/safe-apps-provider": "0.18.1", - "@safe-global/safe-apps-sdk": "8.1.0", + "@safe-global/safe-apps-provider": "0.18.3", + "@safe-global/safe-apps-sdk": "9.1.0", "@walletconnect/ethereum-provider": "2.13.0", "@walletconnect/modal": "2.6.2", "cbw-sdk": "npm:@coinbase/wallet-sdk@3.9.3" diff --git a/packages/connectors/src/safe.ts b/packages/connectors/src/safe.ts index 445458630c..e313685a6f 100644 --- a/packages/connectors/src/safe.ts +++ b/packages/connectors/src/safe.ts @@ -89,16 +89,7 @@ export function safe(parameters: SafeParameters = {}) { if (!isIframe) return if (!provider_) { - const { default: SafeAppsSDK } = await import( - '@safe-global/safe-apps-sdk' - ) - let SDK: typeof SafeAppsSDK.default - if ( - typeof SafeAppsSDK !== 'function' && - typeof SafeAppsSDK.default === 'function' - ) - SDK = SafeAppsSDK.default - else SDK = SafeAppsSDK as unknown as typeof SafeAppsSDK.default + const { default: SDK } = await import('@safe-global/safe-apps-sdk') const sdk = new SDK(parameters) // `getInfo` hangs when not used in Safe App iFrame diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0bc31b31d6..a32fae9377 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -160,11 +160,11 @@ importers: specifier: 0.26.4 version: 0.26.4(bufferutil@4.0.8)(encoding@0.1.13)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(rollup@4.17.2)(utf-8-validate@5.0.10) '@safe-global/safe-apps-provider': - specifier: 0.18.1 - version: 0.18.1(bufferutil@4.0.8)(encoding@0.1.13)(typescript@5.5.2)(utf-8-validate@5.0.10)(zod@3.22.4) + specifier: 0.18.3 + version: 0.18.3(bufferutil@4.0.8)(encoding@0.1.13)(typescript@5.5.2)(utf-8-validate@5.0.10)(zod@3.22.4) '@safe-global/safe-apps-sdk': - specifier: 8.1.0 - version: 8.1.0(bufferutil@4.0.8)(encoding@0.1.13)(typescript@5.5.2)(utf-8-validate@5.0.10)(zod@3.22.4) + specifier: 9.1.0 + version: 9.1.0(bufferutil@4.0.8)(encoding@0.1.13)(typescript@5.5.2)(utf-8-validate@5.0.10)(zod@3.22.4) '@walletconnect/ethereum-provider': specifier: 2.13.0 version: 2.13.0(@types/react@18.3.1)(bufferutil@4.0.8)(encoding@0.1.13)(react@18.3.1)(utf-8-validate@5.0.10) @@ -2423,11 +2423,11 @@ packages: cpu: [x64] os: [win32] - '@safe-global/safe-apps-provider@0.18.1': - resolution: {integrity: sha512-V4a05A3EgJcriqtDoJklDz1BOinWhC6P0hjUSxshA4KOZM7rGPCTto/usXs09zr1vvL28evl/NldSTv97j2bmg==} + '@safe-global/safe-apps-provider@0.18.3': + resolution: {integrity: sha512-f/0cNv3S4v7p8rowAjj0hDCg8Q8P/wBjp5twkNWeBdvd0RDr7BuRBPPk74LCqmjQ82P+1ltLlkmVFSmxTIT7XQ==} - '@safe-global/safe-apps-sdk@8.1.0': - resolution: {integrity: sha512-XJbEPuaVc7b9n23MqlF6c+ToYIS3f7P2Sel8f3cSBQ9WORE4xrSuvhMpK9fDSFqJ7by/brc+rmJR/5HViRr0/w==} + '@safe-global/safe-apps-sdk@9.1.0': + resolution: {integrity: sha512-N5p/ulfnnA2Pi2M3YeWjULeWbjo7ei22JwU/IXnhoHzKq3pYCN6ynL9mJBOlvDVv892EgLPCWCOwQk/uBT2v0Q==} '@safe-global/safe-gateway-typescript-sdk@3.8.0': resolution: {integrity: sha512-CiGWIHgIaOdICpDxp05Jw3OPslWTu8AnL0PhrCT1xZgIO86NlMMLzkGbeycJ4FHpTjA999O791Oxp4bZPIjgHA==} @@ -3239,17 +3239,6 @@ packages: resolution: {integrity: sha512-6/mh1E2u2YgEsCHdY0Yx5oW+61gZU+1vXaoiHHrpKeuRNNgFvS+/jrwHiQhB5apAf5oB7UB7E19ol2R2LKH8hQ==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} - abitype@0.9.8: - resolution: {integrity: sha512-puLifILdm+8sjyss4S+fsUN09obiT1g2YW6CtcQF+QDzxR0euzgEB29MZujC6zMk2a6SVmtttq1fc6+YFA7WYQ==} - peerDependencies: - typescript: '>=5.0.4' - zod: ^3 >=3.19.1 - peerDependenciesMeta: - typescript: - optional: true - zod: - optional: true - abitype@1.0.0: resolution: {integrity: sha512-NMeMah//6bJ56H5XRj8QCV4AwuW6hB6zqz2LnhhLdcWVQOsXki6/Pn3APeqxCma62nXIcmZWdu1DlHWS74umVQ==} peerDependencies: @@ -5229,11 +5218,6 @@ packages: isomorphic-unfetch@3.1.0: resolution: {integrity: sha512-geDJjpoZ8N0kWexiwkX8F9NkTsXhetLPVbZFQ+JTW239QNOwvB0gniuR1Wc6f0AMTn7/mFGyXvHTifrCp/GH8Q==} - isows@1.0.3: - resolution: {integrity: sha512-2cKei4vlmg2cxEjm3wVSqn8pcoRF/LX/wpifuuNquFO4SQmPwarClT+SUCA2lt+l581tTeZIPIZuIDo2jWN1fg==} - peerDependencies: - ws: '*' - isows@1.0.4: resolution: {integrity: sha512-hEzjY+x9u9hPmBom9IIAqdJCwNLax+xrPb51vEPpERoFlIxgmZcHzsT5jKG06nvInKOBGvReAVz80Umed5CczQ==} peerDependencies: @@ -7850,14 +7834,6 @@ packages: vfile@6.0.1: resolution: {integrity: sha512-1bYqc7pt6NIADBJ98UiG0Bn/CHIVOoZ/IyEkqIruLg0mE1BKzkOXY2D6CSqQIcKqgadppE5lrxgWXJmXd7zZJw==} - viem@1.21.4: - resolution: {integrity: sha512-BNVYdSaUjeS2zKQgPs+49e5JKocfo60Ib2yiXOWBT6LuVxY1I/6fFX3waEtpXvL1Xn4qu+BVitVtMh9lyThyhQ==} - peerDependencies: - typescript: '>=5.0.4' - peerDependenciesMeta: - typescript: - optional: true - viem@2.10.8: resolution: {integrity: sha512-ttCXlDmjjcZ8M/eJezXFzDtHj+RFOjEQ3elmXnCC7suXo/y8CuIM1LrIoyUFk7LKIE5E+bzmWUErS4u/MQBtpQ==} peerDependencies: @@ -10569,9 +10545,9 @@ snapshots: '@rollup/rollup-win32-x64-msvc@4.17.2': optional: true - '@safe-global/safe-apps-provider@0.18.1(bufferutil@4.0.8)(encoding@0.1.13)(typescript@5.5.2)(utf-8-validate@5.0.10)(zod@3.22.4)': + '@safe-global/safe-apps-provider@0.18.3(bufferutil@4.0.8)(encoding@0.1.13)(typescript@5.5.2)(utf-8-validate@5.0.10)(zod@3.22.4)': dependencies: - '@safe-global/safe-apps-sdk': 8.1.0(bufferutil@4.0.8)(encoding@0.1.13)(typescript@5.5.2)(utf-8-validate@5.0.10)(zod@3.22.4) + '@safe-global/safe-apps-sdk': 9.1.0(bufferutil@4.0.8)(encoding@0.1.13)(typescript@5.5.2)(utf-8-validate@5.0.10)(zod@3.22.4) events: 3.3.0 transitivePeerDependencies: - bufferutil @@ -10580,10 +10556,10 @@ snapshots: - utf-8-validate - zod - '@safe-global/safe-apps-sdk@8.1.0(bufferutil@4.0.8)(encoding@0.1.13)(typescript@5.5.2)(utf-8-validate@5.0.10)(zod@3.22.4)': + '@safe-global/safe-apps-sdk@9.1.0(bufferutil@4.0.8)(encoding@0.1.13)(typescript@5.5.2)(utf-8-validate@5.0.10)(zod@3.22.4)': dependencies: '@safe-global/safe-gateway-typescript-sdk': 3.8.0(encoding@0.1.13) - viem: 1.21.4(bufferutil@4.0.8)(typescript@5.5.2)(utf-8-validate@5.0.10)(zod@3.22.4) + viem: 2.17.0(bufferutil@4.0.8)(typescript@5.5.2)(utf-8-validate@5.0.10)(zod@3.22.4) transitivePeerDependencies: - bufferutil - encoding @@ -11969,11 +11945,6 @@ snapshots: abbrev@2.0.0: {} - abitype@0.9.8(typescript@5.5.2)(zod@3.22.4): - optionalDependencies: - typescript: 5.5.2 - zod: 3.22.4 - abitype@1.0.0(typescript@5.5.2)(zod@3.22.2): optionalDependencies: typescript: 5.5.2 @@ -14155,10 +14126,6 @@ snapshots: transitivePeerDependencies: - encoding - isows@1.0.3(ws@8.13.0(bufferutil@4.0.8)(utf-8-validate@5.0.10)): - dependencies: - ws: 8.13.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) - isows@1.0.4(ws@8.13.0(bufferutil@4.0.8)(utf-8-validate@5.0.10)): dependencies: ws: 8.13.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) @@ -17336,23 +17303,6 @@ snapshots: unist-util-stringify-position: 4.0.0 vfile-message: 4.0.2 - viem@1.21.4(bufferutil@4.0.8)(typescript@5.5.2)(utf-8-validate@5.0.10)(zod@3.22.4): - dependencies: - '@adraffy/ens-normalize': 1.10.0 - '@noble/curves': 1.2.0 - '@noble/hashes': 1.3.2 - '@scure/bip32': 1.3.2 - '@scure/bip39': 1.2.1 - abitype: 0.9.8(typescript@5.5.2)(zod@3.22.4) - isows: 1.0.3(ws@8.13.0(bufferutil@4.0.8)(utf-8-validate@5.0.10)) - ws: 8.13.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) - optionalDependencies: - typescript: 5.5.2 - transitivePeerDependencies: - - bufferutil - - utf-8-validate - - zod - viem@2.10.8(bufferutil@4.0.8)(typescript@5.5.2)(utf-8-validate@5.0.10)(zod@3.22.2): dependencies: '@adraffy/ens-normalize': 1.10.0