From 7fe21f3d4f97589f44e9df0acc70414d101b7b9e Mon Sep 17 00:00:00 2001 From: daltoncoder Date: Thu, 5 Sep 2024 18:05:32 -0400 Subject: [PATCH] Fix blake3 hash output --- src/commands/functions/deploy.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/commands/functions/deploy.ts b/src/commands/functions/deploy.ts index 27056c9..755f66b 100644 --- a/src/commands/functions/deploy.ts +++ b/src/commands/functions/deploy.ts @@ -86,7 +86,7 @@ const deployAction: SdkGuardedFunction = async ({ if (sgx) { const buffer = await fs.promises.readFile(filePathToUpload); - b3Hash = blake3(buffer); + b3Hash = await blake3(buffer); } if (!output.debugEnabled && !args.noBundle) { @@ -145,10 +145,6 @@ const deployAction: SdkGuardedFunction = async ({ if (!args.private) { output.log(t('callFleekFunctionByNetworkUrlReq')); // TODO: Add a secret - const networkServiceId = sgx ? NETWORK_SERVICE_WITH_SGX : NETWORK_SERVICE; - output.link( - `https://fleek-test.network/services/${networkServiceId}/ipfs/${uploadResult.pin.cid}`, - ); if (sgx){ output.link("https://fleek-test.network/services/3"); @@ -156,6 +152,11 @@ const deployAction: SdkGuardedFunction = async ({ output.link(`Blake3 Hash: ${b3Hash} `) output.link(`Invoke by sending request to https://fleek-test.network/services/3 with payload of {hash: , decrypt: true, inputs: "foo"}`) output.link(`Example: curl fleek-test.network/services/3 --data '{"hash": "${b3Hash}", "decrypt": true, "input": "foo"}'`) + } else { + output.link( + `https://fleek-test.network/services/1/ipfs/${uploadResult.pin.cid}`, + ); + } } };