@@ -192,23 +192,23 @@ async function main() {
192192 const snapPath = path . join ( SNAPS_DIR , `${ snapFile } .snap` ) ;
193193 const assertPath = path . join ( ASSERTIONS_DIR , `${ snapFile } .assert` ) ;
194194
195- // console.log(`Downloading snap...`);
196- // await downloadSnap(info.downloadUrl, snapPath);
195+ console . log ( `Downloading snap...` ) ;
196+ await downloadSnap ( info . downloadUrl , snapPath ) ;
197197
198- // console.log(`Downloading snap assertion...`);
198+ console . log ( `Downloading snap assertion...` ) ;
199199
200- // const snapDeclarationAssertion = await fetchAssertion('snap-declaration', `${SNAP_SERIES}/${info.snapId}`);
200+ const snapDeclarationAssertion = await fetchAssertion ( 'snap-declaration' , `${ SNAP_SERIES } /${ info . snapId } ` ) ;
201201
202- // // Get Canonical account key assertion (since we're using official snaps) among any others if we use third-party snaps
203- // const accountKeyAssertion = await fetchAssertion('account-key', snapDeclarationAssertion.match(SIGN_KEY_REGEX)[1]);
202+ // Get Canonical account key assertion (since we're using official snaps) among any others if we use third-party snaps
203+ const accountKeyAssertion = await fetchAssertion ( 'account-key' , snapDeclarationAssertion . match ( SIGN_KEY_REGEX ) [ 1 ] ) ;
204204
205- // // Get the assertion
206- // const snapFileBuffer = fs.readFileSync(snapPath);
207- // const snapRevisionHash = crypto.createHash('sha3-384').update(snapFileBuffer).digest('base64url');
208- // // dbg console.log(snapRevisionHash);
209- // const snapRevisionAssertion = await fetchAssertion('snap-revision', snapRevisionHash);
205+ // Get the assertion
206+ const snapFileBuffer = fs . readFileSync ( snapPath ) ;
207+ const snapRevisionHash = crypto . createHash ( 'sha3-384' ) . update ( snapFileBuffer ) . digest ( 'base64url' ) ;
208+ //dbg console.log(snapRevisionHash);
209+ const snapRevisionAssertion = await fetchAssertion ( 'snap-revision' , snapRevisionHash ) ;
210210
211- // fs.writeFileSync(assertPath, accountKeyAssertion + '\n' + snapDeclarationAssertion + '\n' + snapRevisionAssertion);
211+ fs . writeFileSync ( assertPath , accountKeyAssertion + '\n' + snapDeclarationAssertion + '\n' + snapRevisionAssertion ) ;
212212
213213 let extraOptions = JSON . parse ( snapOptions ) ;
214214 //dbg console.log(extraOptions)
0 commit comments