diff --git a/packages/thirdweb/src/transaction/prepare-transaction.test.ts b/packages/thirdweb/src/transaction/prepare-transaction.test.ts index 4afa4f0bb39..23c8806718a 100644 --- a/packages/thirdweb/src/transaction/prepare-transaction.test.ts +++ b/packages/thirdweb/src/transaction/prepare-transaction.test.ts @@ -6,7 +6,7 @@ import { TEST_WALLET_A, TEST_WALLET_B } from "../../test/src/addresses.js"; import { estimateGas } from "./actions/estimate-gas.js"; import { prepareTransaction } from "./prepare-transaction.js"; import { ethereum } from "../chains/chain-definitions/ethereum.js"; -import { parseEther } from "../utils/units.js"; +import { toWei } from "../utils/units.js"; describe("prepareTransaction", () => { test("should prepare a transaction", () => { @@ -14,7 +14,7 @@ describe("prepareTransaction", () => { chain: ethereum, client: TEST_CLIENT, to: TEST_WALLET_B, - value: parseEther("0.1"), + value: toWei("0.1"), }); expect(preparedTx.to).toBe(TEST_WALLET_B); expect(preparedTx.value).toMatchInlineSnapshot(`100000000000000000n`); @@ -25,7 +25,7 @@ describe("prepareTransaction", () => { chain: ethereum, client: TEST_CLIENT, to: TEST_WALLET_B, - value: parseEther("0.1"), + value: toWei("0.1"), }); const estimate = await estimateGas({ transaction: preparedTx, diff --git a/packages/thirdweb/src/transaction/prepare-transaction.ts b/packages/thirdweb/src/transaction/prepare-transaction.ts index b80cd45c58e..8ca729ddfc6 100644 --- a/packages/thirdweb/src/transaction/prepare-transaction.ts +++ b/packages/thirdweb/src/transaction/prepare-transaction.ts @@ -45,13 +45,13 @@ export type PreparedTransaction< * @transaction * @example * ```ts - * import { prepareTransaction, parseEther } from "thirdweb"; + * import { prepareTransaction, toWei } from "thirdweb"; * import { ethereum } from "thirdweb/chains"; * const transaction = prepareTransaction({ * to: "0x1234567890123456789012345678901234567890", * chain: ethereum, * client: thirdwebClient, - * value: parseEther("1.0"), + * value: toWei("1.0"), * }); * ``` */