From 85762ee683299e34d391bd1eb1997389d0afa22e Mon Sep 17 00:00:00 2001 From: nk1tz Date: Tue, 31 Oct 2023 11:36:55 -0700 Subject: [PATCH] fix: vite env vars for trezor --- src/trezor.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/trezor.js b/src/trezor.js index 9d2c841..f928f1e 100644 --- a/src/trezor.js +++ b/src/trezor.js @@ -110,10 +110,12 @@ const env_variables = { ...process.env }; // Accessing directly does not appear const ENV_TREZOR_CONNECT_URL = env_variables.TREZOR_CONNECT_URL || - env_variables.REACT_APP_TREZOR_CONNECT_URL; + env_variables.REACT_APP_TREZOR_CONNECT_UR || + env_variables.VITE_TREZOR_CONNECT_URL; const ENV_TREZOR_BLOCKBOOK_URL = env_variables.TREZOR_BLOCKBOOK_URL || - env_variables.REACT_APP_TREZOR_BLOCKBOOK_URL; + env_variables.REACT_APP_TREZOR_BLOCKBOOK_URL || + env_variables.VITE_TREZOR_BLOCKBOOK_URL; const TREZOR_CONNECT_URL = ENV_TREZOR_CONNECT_URL || `https://${window.location.hostname}:8088/`; @@ -121,7 +123,9 @@ const TREZOR_BLOCKBOOK_URL = ENV_TREZOR_BLOCKBOOK_URL || `http://${window.location.hostname}:3035/`; const TREZOR_DEV = - env_variables.TREZOR_DEV || env_variables.REACT_APP_TREZOR_DEV; + env_variables.TREZOR_DEV || + env_variables.REACT_APP_TREZOR_DEV || + env_variables.VITE_TREZOR_DEV; try { if (TREZOR_DEV) TrezorConnect.init({