From 4636261481ad41173a291eba9acad2b0ca6caa85 Mon Sep 17 00:00:00 2001 From: Karandeep Singh Date: Wed, 17 Jul 2024 10:53:27 -0400 Subject: [PATCH 1/2] fix: sendTransaction arg type --- .../src/lib/smart-accounts/SafeSmartAccountLib.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/advanced/wallets/react-wallet-v2/src/lib/smart-accounts/SafeSmartAccountLib.ts b/advanced/wallets/react-wallet-v2/src/lib/smart-accounts/SafeSmartAccountLib.ts index 3a0c5ae5b..e291d3793 100644 --- a/advanced/wallets/react-wallet-v2/src/lib/smart-accounts/SafeSmartAccountLib.ts +++ b/advanced/wallets/react-wallet-v2/src/lib/smart-accounts/SafeSmartAccountLib.ts @@ -56,13 +56,13 @@ export class SafeSmartAccountLib extends SmartAccountLib { } } - async sendTransaction({ to, value, data }: { to: Address; value: bigint; data: Hex }) { + async sendTransaction({ to, value, data }: { to: Address; value: bigint | Hex; data: Hex }) { if (!this.client?.account) { throw new Error('Client not initialized') } const txResult = await this.client.sendTransaction({ to, - value, + value: BigInt(value), data, account: this.client.account, chain: this.chain From 7a67d46f903487330910010346ace7bbca91e7b0 Mon Sep 17 00:00:00 2001 From: Karandeep Singh Date: Wed, 17 Jul 2024 10:58:31 -0400 Subject: [PATCH 2/2] fix sendTransaction arg type on SmartAccountLib.ts --- .../react-wallet-v2/src/lib/smart-accounts/SmartAccountLib.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/advanced/wallets/react-wallet-v2/src/lib/smart-accounts/SmartAccountLib.ts b/advanced/wallets/react-wallet-v2/src/lib/smart-accounts/SmartAccountLib.ts index 1a8f0f832..5e7e46f34 100644 --- a/advanced/wallets/react-wallet-v2/src/lib/smart-accounts/SmartAccountLib.ts +++ b/advanced/wallets/react-wallet-v2/src/lib/smart-accounts/SmartAccountLib.ts @@ -200,13 +200,13 @@ export abstract class SmartAccountLib implements EIP155Wallet { const signature = await this.client.account.signTransaction(transaction) return signature || '' } - async sendTransaction({ to, value, data }: { to: Address; value: bigint; data: Hex }) { + async sendTransaction({ to, value, data }: { to: Address; value: bigint | Hex; data: Hex }) { if (!this.client || !this.client.account) { throw new Error('Client not initialized') } const txResult = await this.client.sendTransaction({ to, - value, + value: BigInt(value), data, account: this.client.account, chain: this.chain