Skip to content

Commit

Permalink
small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
theBeardA committed Sep 5, 2024
1 parent 7fe21f3 commit 6adb1af
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
6 changes: 1 addition & 5 deletions src/commands/functions/utils/getWasmCodeFromPath.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ const enryptCode = async (args: { filePath: string }) => {
const { filePath } = args;

const buffer = await getWasm(filePath);

if (!buffer) {
output.error(t('invalidWasmCode', { path: filePath }));
throw new FleekFunctionInvalidWasmCodeError({})
Expand All @@ -61,25 +60,22 @@ const enryptCode = async (args: { filePath: string }) => {
fs.mkdirSync(tempDir);
}
}

const outFile = `${tempDir}/function.wasm`;


progressBar.start(100, 10);
try {
const encryptedData = encrypt(PUBLIC_KEY, buffer);
progressBar.update(50);

await fs.promises.writeFile(outFile, encryptedData);
} catch (error) {
progressBar.stop();
throw new FleekFunctionWasmEncryptionFailedError({})

}

progressBar.update(100);
progressBar.stop();


return tempDir;
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ export const waitForPersonalAccessTokenFromVerificationSession = async ({
conditionFn: async () => {
const response = await client
.mutation({
createPersonalAccessTokenFromVerificationSession: {
__args: { where: { id: verificationSessionId }, data: { name } },
}
createPersonalAccessTokenFromVerificationSession: [
{ where: { id: verificationSessionId }, data: { name } },
],

})
.catch(() => null);
Expand Down

0 comments on commit 6adb1af

Please sign in to comment.