From 8d6c7e80f8de04be8b1675f676d67726bb3ca86e Mon Sep 17 00:00:00 2001 From: Daniel Izdebski Date: Tue, 20 Feb 2024 23:44:57 +0100 Subject: [PATCH 1/3] =?UTF-8?q?=F0=9F=9A=91=EF=B8=8F=20fix(core):=20Minify?= =?UTF-8?q?=20whitespaces=20when=20compiling=20setup=20files?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/core/src/utils/getWalletSetupFuncHash.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/core/src/utils/getWalletSetupFuncHash.ts b/packages/core/src/utils/getWalletSetupFuncHash.ts index 3a89ceab9..7856d2b70 100644 --- a/packages/core/src/utils/getWalletSetupFuncHash.ts +++ b/packages/core/src/utils/getWalletSetupFuncHash.ts @@ -12,6 +12,7 @@ export function getWalletSetupFuncHash(walletSetupFunc: AnyFunction) { // Different execution engines -> different codes -> different hashes. const { code } = esbuild.transformSync(walletSetupFunc.toString(), { format: 'esm', + minifyWhitespace: true, drop: ['console', 'debugger'], loader: 'ts', logLevel: 'silent' From 5abb3fc41601af3d5459a9302b05449509bc777d Mon Sep 17 00:00:00 2001 From: drptbl Date: Tue, 20 Feb 2024 23:05:50 +0000 Subject: [PATCH 2/3] =?UTF-8?q?=E2=9C=85=20chore:=20update=20cache=20hash?= =?UTF-8?q?=20for=20defineWalletSetup?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/core/test/defineWalletSetup.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/test/defineWalletSetup.test.ts b/packages/core/test/defineWalletSetup.test.ts index 03efba24f..c5ab033f0 100644 --- a/packages/core/test/defineWalletSetup.test.ts +++ b/packages/core/test/defineWalletSetup.test.ts @@ -2,7 +2,7 @@ import { describe, expect, it } from 'vitest' import { defineWalletSetup } from '../src/defineWalletSetup' const PASSWORD = 'Quack Quack! 🦆' -const EXPECTED_HASH = '69620d59802a61c6900f' +const EXPECTED_HASH = 'f9c5ea5bb2c3aac96ff4' const testWalletSetupFunction = async (): Promise => { const result = 1 + 2 From ebbe0e870937d4cbef18d6f840e97bc0e3524217 Mon Sep 17 00:00:00 2001 From: drptbl Date: Tue, 20 Feb 2024 23:07:17 +0000 Subject: [PATCH 3/3] =?UTF-8?q?=E2=9C=85=20chore:=20update=20cache=20hash?= =?UTF-8?q?=20for=20getWalletSetupFuncHash?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/core/test/utils/getWalletSetupFuncHash.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/test/utils/getWalletSetupFuncHash.test.ts b/packages/core/test/utils/getWalletSetupFuncHash.test.ts index 22b9b6e6e..7c2e9ecdf 100644 --- a/packages/core/test/utils/getWalletSetupFuncHash.test.ts +++ b/packages/core/test/utils/getWalletSetupFuncHash.test.ts @@ -1,7 +1,7 @@ import { describe, expect, it } from 'vitest' import { WALLET_SETUP_FUNC_HASH_LENGTH, getWalletSetupFuncHash } from '../../src/utils/getWalletSetupFuncHash' -const EXPECTED_HASH = 'c339a616cd86dc167b68' +const EXPECTED_HASH = 'b940c886be3c1a041ddd' const testFunction = async (name: string) => { return `Hello ${name}!`