From 8cb3ccc0c2964effe86755eeb03009365535d53f Mon Sep 17 00:00:00 2001 From: Jonas Daniels Date: Fri, 9 Feb 2024 22:41:47 -0800 Subject: [PATCH] refactor: change type name from AllowanceOptions to AllowanceParams --- packages/thirdweb/src/extensions/erc20.ts | 2 +- packages/thirdweb/src/extensions/erc20/read/allowance.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/thirdweb/src/extensions/erc20.ts b/packages/thirdweb/src/extensions/erc20.ts index 65f9993772e..b45a3c83fd7 100644 --- a/packages/thirdweb/src/extensions/erc20.ts +++ b/packages/thirdweb/src/extensions/erc20.ts @@ -3,7 +3,7 @@ export { balanceOf } from "./erc20/read/balanceOf.js"; export { detectDecimals, decimals } from "./erc20/read/decimals.js"; export { symbol } from "./erc20/read/symbol.js"; export { totalSupply } from "./erc20/read/totalSupply.js"; -export { allowance, type AllowanceOptions } from "./erc20/read/allowance.js"; +export { allowance, type AllowanceParams } from "./erc20/read/allowance.js"; // write export { mintTo } from "./erc20/write/mintTo.js"; export { transfer } from "./erc20/write/transfer.js"; diff --git a/packages/thirdweb/src/extensions/erc20/read/allowance.ts b/packages/thirdweb/src/extensions/erc20/read/allowance.ts index b71c7b7816d..5a4d2a928c0 100644 --- a/packages/thirdweb/src/extensions/erc20/read/allowance.ts +++ b/packages/thirdweb/src/extensions/erc20/read/allowance.ts @@ -2,7 +2,7 @@ import type { Address } from "abitype"; import { readContract } from "../../../transaction/actions/read.js"; import type { TxOpts } from "../../../transaction/transaction.js"; -export type AllowanceOptions = { +export type AllowanceParams = { owner: Address; spender: Address; }; @@ -18,7 +18,7 @@ export type AllowanceOptions = { * const spenderAllowance = await allowance({ contract, owner, spender }); * ``` */ -export function allowance(options: TxOpts): Promise { +export function allowance(options: TxOpts): Promise { return readContract({ ...options, method: