@@ -161,7 +161,6 @@ export class HypercertClient implements HypercertClientInterface {
161161 mintHypercert = async ( { metaData, totalUnits, transferRestriction, allowList, overrides } : MintParams ) => {
162162 const { account } = this . getConnected ( ) ;
163163
164- let root ;
165164 let tree ;
166165
167166 if ( allowList ) {
@@ -189,10 +188,13 @@ export class HypercertClient implements HypercertClientInterface {
189188
190189 allowListEntries = lines . map ( ( line ) => {
191190 const values = line . split ( "," ) ;
192- const entry = headers . reduce ( ( acc , header , i ) => {
193- acc [ header ] = values [ i ] ;
194- return acc ;
195- } , { } as Record < string , string > ) ;
191+ const entry = headers . reduce (
192+ ( acc , header , i ) => {
193+ acc [ header ] = values [ i ] ;
194+ return acc ;
195+ } ,
196+ { } as Record < string , string > ,
197+ ) ;
196198 const { address, units } = entry ;
197199 return { address, units : BigInt ( units ) } ;
198200 } ) ;
@@ -206,8 +208,6 @@ export class HypercertClient implements HypercertClientInterface {
206208 if ( ! tree ) {
207209 throw new ClientError ( "Invalid or no contents found for the provided allow list" , { allowList } ) ;
208210 }
209-
210- root = tree . root ;
211211 }
212212
213213 if ( allowList && ! tree ) {
@@ -236,7 +236,7 @@ export class HypercertClient implements HypercertClientInterface {
236236 const method = allowList && tree ? "createAllowlist" : "mintClaim" ;
237237 const params =
238238 allowList && tree
239- ? [ account ?. address , totalUnits , root , cid , transferRestriction ]
239+ ? [ account ?. address , totalUnits , tree . root , cid , transferRestriction ]
240240 : [ account ?. address , totalUnits , cid , transferRestriction ] ;
241241
242242 const request = await this . simulateRequest ( account , method , params , overrides ) ;
0 commit comments