Skip to content

Commit 4cfa881

Browse files
committed
fix(sdk): adds overrides to createNewPack
1 parent 2591c75 commit 4cfa881

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

packages/thirdweb/src/extensions/pack/createNewPack.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
import type { ThirdwebClient } from "../../client/client.js";
22
import { type ThirdwebContract, getContract } from "../../contract/contract.js";
33
import { upload } from "../../storage/upload.js";
4-
import type { BaseTransactionOptions } from "../../transaction/types.js";
4+
import type {
5+
BaseTransactionOptions,
6+
WithOverrides,
7+
} from "../../transaction/types.js";
58
import type { NFTInput } from "../../utils/nft/parseNft.js";
69
import { toUnits } from "../../utils/units.js";
710
import type { AddPackContentsParams } from "./__generated__/IPack/write/addPackContents.js";
@@ -114,7 +117,7 @@ export type CreateNewPackParams = {
114117
* ```
115118
*/
116119
export function createNewPack(
117-
options: BaseTransactionOptions<CreateNewPackParams>,
120+
options: WithOverrides<BaseTransactionOptions<CreateNewPackParams>>,
118121
) {
119122
return createPack({
120123
contract: options.contract,
@@ -126,7 +129,7 @@ export function createNewPack(
126129
* @internal
127130
*/
128131
async function getCreatePackParams(
129-
options: BaseTransactionOptions<CreateNewPackParams>,
132+
options: WithOverrides<BaseTransactionOptions<CreateNewPackParams>>,
130133
): Promise<CreatePackParams> {
131134
const {
132135
contract,
@@ -138,6 +141,7 @@ async function getCreatePackParams(
138141
erc721Rewards,
139142
erc1155Rewards,
140143
tokenOwner,
144+
overrides,
141145
} = options;
142146
const [erc20Content, erc721Content, erc1155Content, packUri] =
143147
await Promise.all([
@@ -179,6 +183,7 @@ async function getCreatePackParams(
179183
// openStartTimestamp should be in seconds and not millisecond
180184
openStartTimestamp: BigInt(Math.ceil(openStartTimestamp.getTime() / 1000)),
181185
amountDistributedPerOpen,
186+
overrides,
182187
};
183188
}
184189

0 commit comments

Comments
 (0)