From 3e5d89457601ad4c30881af41acc6b498fa611bb Mon Sep 17 00:00:00 2001 From: hzheng-ledger Date: Wed, 27 Mar 2024 09:21:36 +0100 Subject: [PATCH] fix: liveConfig for bot --- .changeset/grumpy-cars-rescue.md | 5 +++++ .../src/__tests__/test-helpers/environment.ts | 3 +++ libs/ledger-live-common/src/__tests__/test-helpers/setup.ts | 3 --- 3 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 .changeset/grumpy-cars-rescue.md diff --git a/.changeset/grumpy-cars-rescue.md b/.changeset/grumpy-cars-rescue.md new file mode 100644 index 000000000000..bdeaf0e600f0 --- /dev/null +++ b/.changeset/grumpy-cars-rescue.md @@ -0,0 +1,5 @@ +--- +"@ledgerhq/live-common": patch +--- + +fix bot test due to liveConfig diff --git a/libs/ledger-live-common/src/__tests__/test-helpers/environment.ts b/libs/ledger-live-common/src/__tests__/test-helpers/environment.ts index 045f4cce09fe..4fa15302178e 100644 --- a/libs/ledger-live-common/src/__tests__/test-helpers/environment.ts +++ b/libs/ledger-live-common/src/__tests__/test-helpers/environment.ts @@ -4,6 +4,8 @@ import { setSupportedCurrencies } from "../../currencies"; import { EnvName, setEnvUnsafe, setEnv } from "@ledgerhq/live-env"; import { setWalletAPIVersion } from "../../wallet-api/version"; import { WALLET_API_VERSION } from "../../wallet-api/constants"; +import { LiveConfig } from "@ledgerhq/live-config/LiveConfig"; +import { liveConfig } from "../../config/sharedConfig"; setWalletAPIVersion(WALLET_API_VERSION); setSupportedCurrencies([ @@ -98,6 +100,7 @@ setSupportedCurrencies([ "linea", "linea_goerli", ]); +LiveConfig.setConfig(liveConfig); for (const k in process.env) setEnvUnsafe(k as EnvName, process.env[k]); diff --git a/libs/ledger-live-common/src/__tests__/test-helpers/setup.ts b/libs/ledger-live-common/src/__tests__/test-helpers/setup.ts index cafef0367972..ee83c6f72139 100644 --- a/libs/ledger-live-common/src/__tests__/test-helpers/setup.ts +++ b/libs/ledger-live-common/src/__tests__/test-helpers/setup.ts @@ -1,9 +1,6 @@ import "./environment"; import BigNumber from "bignumber.js"; -import { liveConfig } from "../../config/sharedConfig"; -import { LiveConfig } from "@ledgerhq/live-config/LiveConfig"; -LiveConfig.setConfig(liveConfig); jest.setTimeout(360000); expect.extend({