File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -174,8 +174,8 @@ export default class DropKit {
174174 return await this . contract ?. presaleActive ( )
175175 }
176176
177- async generateProof ( ) : Promise < ProofApiResponse > {
178- const { data } = await axios . post < ProofApiResponse > (
177+ async generateProof ( ) : Promise < ProofApiResponse & ErrorApiResponse > {
178+ const { data } = await axios . post < ProofApiResponse & ErrorApiResponse > (
179179 `${ this . apiBaseUrl } /drops/list/${ this . collectionId } ` ,
180180 {
181181 wallet : this . walletAddress ,
@@ -243,7 +243,7 @@ export default class DropKit {
243243 amount : BigNumber
244244 ) : Promise < ContractReceipt > {
245245 const data = await this . generateProof ( )
246- if ( ! data . proof ) {
246+ if ( data . message ) {
247247 // Backwards compatibility for v2 contracts
248248 if ( this . version === 3 ) {
249249 throw new Error (
@@ -255,6 +255,7 @@ export default class DropKit {
255255
256256 const trx : ContractTransaction = await this . contract ?. presaleMint (
257257 quantity ,
258+ data . proof ,
258259 {
259260 value : amount ,
260261 }
You can’t perform that action at this time.
0 commit comments