1- import { type Account as ViemAccount , zeroAddress } from "viem" ;
1+ import type { Account as ViemAccount } from "viem" ;
22import { privateKeyToAccount as viemPrivateKeyToAccount } from "viem/accounts" ;
33import { beforeAll , describe , expect , test } from "vitest" ;
44import { USDT_ABI } from "~test/abis/usdt.js" ;
55import {
66 USDT_CONTRACT_ADDRESS ,
77 USDT_CONTRACT_WITH_ABI ,
88} from "~test/test-contracts.js" ;
9- import { ANVIL_PKEY_A } from "~test/test-wallets.js" ;
9+ import { ANVIL_PKEY_A , TEST_ACCOUNT_B } from "~test/test-wallets.js" ;
1010import { typedData } from "~test/typed-data.js" ;
1111
1212import { ANVIL_CHAIN , FORKED_ETHEREUM_CHAIN } from "../../test/src/chains.js" ;
@@ -87,6 +87,7 @@ describe("walletClient.toViem", () => {
8787 if ( ! walletClient . account ) {
8888 throw new Error ( "Account not found" ) ;
8989 }
90+
9091 const txHash = await walletClient . sendTransaction ( {
9192 account : walletClient . account ,
9293 chain : {
@@ -101,8 +102,8 @@ describe("walletClient.toViem", () => {
101102 decimals : ANVIL_CHAIN . nativeCurrency ?. decimals || 18 ,
102103 } ,
103104 } ,
104- to : zeroAddress ,
105- value : 0n ,
105+ to : TEST_ACCOUNT_B . address ,
106+ value : 10n ,
106107 } ) ;
107108 expect ( txHash ) . toBeDefined ( ) ;
108109 expect ( txHash . slice ( 0 , 2 ) ) . toBe ( "0x" ) ;
0 commit comments