Skip to content

Commit

Permalink
[wallets] Update Safe SDK (#2221)
Browse files Browse the repository at this point in the history
  • Loading branch information
MananTank authored Jan 26, 2024
1 parent a5653f0 commit 4d89dc1
Show file tree
Hide file tree
Showing 4 changed files with 818 additions and 30 deletions.
5 changes: 5 additions & 0 deletions .changeset/stupid-tigers-think.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@thirdweb-dev/wallets": patch
---

Update Safe SDK in wallets package
4 changes: 1 addition & 3 deletions packages/wallets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -487,9 +487,8 @@
"@metamask/eth-sig-util": "^4.0.0",
"@paperxyz/embedded-wallet-service-sdk": "^1.2.5",
"@paperxyz/sdk-common-utilities": "^0.1.0",
"@safe-global/safe-core-sdk": "^3.3.4",
"@safe-global/protocol-kit": "1.3.0",
"@safe-global/safe-ethers-adapters": "0.1.0-alpha.17",
"@safe-global/safe-ethers-lib": "^1.9.4",
"@thirdweb-dev/chains": "workspace:*",
"@thirdweb-dev/contracts-js": "workspace:*",
"@thirdweb-dev/crypto": "workspace:*",
Expand Down Expand Up @@ -563,7 +562,6 @@
"ethers-aws-kms-signer": "^1.3.2",
"hardhat": "^2.17.0",
"jest": "^29.6.2",
"rimraf": "^3.0.2",
"ts-jest": "^29.1.1",
"tweetnacl": "^1.0.3",
"typedoc-gen": "workspace:*",
Expand Down
7 changes: 3 additions & 4 deletions packages/wallets/src/evm/connectors/safe/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import {
SafeService,
SafeEthersSigner,
} from "@safe-global/safe-ethers-adapters";
import safeCoreSdk from "@safe-global/safe-core-sdk";
import safeEthersLib from "@safe-global/safe-ethers-lib";
import safeCoreSdk, { EthersAdapter } from "@safe-global/protocol-kit";
import { EVMWallet } from "../../interfaces";
import { CHAIN_ID_TO_GNOSIS_SERVER_URL } from "./constants";

Expand Down Expand Up @@ -132,7 +131,7 @@ export class SafeConnector extends Connector<SafeConnectionArgs> {
throw new Error("Chain not supported");
}

const ethAdapter = new safeEthersLib({
const ethAdapter = new EthersAdapter({
ethers,
signerOrProvider: signer,
});
Expand Down Expand Up @@ -186,7 +185,7 @@ export class SafeConnector extends Connector<SafeConnectionArgs> {
const safeTxHash = await safe.getTransactionHash(safeTx);
const safeSignature = await safe.signTransactionHash(safeTxHash);
await service.proposeTx(
safe.getAddress(),
await safe.getAddress(),
safeTxHash,
safeTx,
safeSignature,
Expand Down
Loading

0 comments on commit 4d89dc1

Please sign in to comment.