Skip to content

Commit 50dd199

Browse files
authored
Merge pull request #19 from niftykit-inc/deprecate-auctions
Deprecate auctions endpoints
2 parents 6e4df7a + 33d1038 commit 50dd199

File tree

2 files changed

+2
-43
lines changed

2 files changed

+2
-43
lines changed

README.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,6 @@ class DropKit {
129129
totalSupply(): Promise<number>;
130130
saleActive(): Promise<boolean>;
131131
presaleActive(): Promise<boolean>;
132-
auctionActive(): Promise<boolean>;
133-
auctionDuration(): Promise<number>;
134-
auctionPrice(): Promise<BigNumber>;
135-
auctionStartedAt(): Promise<number>;
136132
generateProof(): Promise<ProofApiResponse & ErrorApiResponse>;
137133
mint(quantity: number): Promise<ContractReceipt | null>;
138134
onMinted(listener: Listener): Contract;

src/DropKit.ts

Lines changed: 2 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -236,40 +236,6 @@ export default class DropKit {
236236
return await this.contract.presaleActive()
237237
}
238238

239-
async auctionActive(): Promise<boolean> {
240-
if (this.version < 4) {
241-
return false
242-
}
243-
return await this.contract.auctionActive()
244-
}
245-
246-
async auctionDuration(): Promise<number> {
247-
if (this.version < 4) {
248-
return 0
249-
}
250-
const duration: BigNumber = await this.contract.auctionDuration()
251-
252-
return duration.toNumber()
253-
}
254-
255-
async auctionPrice(): Promise<BigNumber> {
256-
if (this.version < 4) {
257-
return BigNumber.from(0)
258-
}
259-
const price: BigNumber = await this.contract.auctionPrice()
260-
261-
return price
262-
}
263-
264-
async auctionStartedAt(): Promise<number> {
265-
if (this.version < 4) {
266-
return 0
267-
}
268-
const epoch: BigNumber = await this.contract.auctionStartedAt()
269-
270-
return epoch.toNumber()
271-
}
272-
273239
async generateProof(): Promise<ProofApiResponse & ErrorApiResponse> {
274240
const { data } = await axios.post<ProofApiResponse & ErrorApiResponse>(
275241
`${this.apiBaseUrl}/drops/list/${this.collectionId}`,
@@ -291,7 +257,6 @@ export default class DropKit {
291257

292258
const presaleActive = await this.presaleActive()
293259
const saleActive = await this.saleActive()
294-
const auctionActive = await this.auctionActive()
295260

296261
const tokensCount = await this.walletTokensCount()
297262
const maxPerWallet = await this.maxPerWallet()
@@ -302,13 +267,11 @@ export default class DropKit {
302267
)
303268
}
304269

305-
if (!saleActive && !presaleActive && !auctionActive) {
270+
if (!saleActive && !presaleActive) {
306271
throw new Error('Collection is not active')
307272
}
308273

309-
const price = auctionActive
310-
? await this.auctionPrice()
311-
: await this.price()
274+
const price = await this.price()
312275
const amount = price.mul(quantity)
313276

314277
// Presale minting

0 commit comments

Comments
 (0)