From 9215618ffcce8921caeea6a6efe9bac62668ff16 Mon Sep 17 00:00:00 2001 From: Daniel <25051234+dasanra@users.noreply.github.com> Date: Tue, 28 Nov 2023 13:16:24 +0100 Subject: [PATCH] Update ethersv6 changes --- safe-core-sdk/auth-kit/guides/safe-auth.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/safe-core-sdk/auth-kit/guides/safe-auth.md b/safe-core-sdk/auth-kit/guides/safe-auth.md index 1585ca9c..0807e81e 100644 --- a/safe-core-sdk/auth-kit/guides/safe-auth.md +++ b/safe-core-sdk/auth-kit/guides/safe-auth.md @@ -116,7 +116,7 @@ import { ethers } from 'ethers' import { EthersAdapter } from '@safe-global/protocol-kit' // Wrap EIP-1193 provider with ethers -const provider = new ethers.providers.Web3Provider(safeAuthPack.getProvider()) +const provider = new ethers.BrowserProvider(safeAuthPack.getProvider()) const signer = provider.getSigner() // Create the Safe EthersAdapter @@ -135,11 +135,11 @@ const protocolKit = await Safe.create({ const safeTransactionData: MetaTransactionData = { to: `${ethAddress}`, data: '0x', - value: ethers.utils.parseUnits('0.0001', 'ether').toString(), + value: ethers.parseUnits('0.0001', 'ether').toString(), } const safeTransaction = await protocolKit.createTransaction({ - safeTransactionData, + transactions: [safeTransactionData], }) // Sign the transaction if the Safe have several owners @@ -165,7 +165,7 @@ const address = '0x...' await web3.eth.personal.sign(message, address) // Using ethers -const provider = new ethers.providers.Web3Provider(safeAuthPack.getProvider()) +const provider = new ethers.BrowserProvider(safeAuthPack.getProvider()) const signer = provider.getSigner() await signer.sendTransaction(tx)