diff --git a/.github/workflows/cron.yml b/.github/workflows/cron.yml index cedef5c2e..1e904d33e 100644 --- a/.github/workflows/cron.yml +++ b/.github/workflows/cron.yml @@ -33,9 +33,6 @@ jobs: python start.py tentacles --install --location "../any_platform.zip" --all - name: Compile project - env: - BINANCE_API_KEY: ${{ secrets.BINANCE_API_KEY }} - BINANCE_API_SECRET: ${{ secrets.BINANCE_API_SECRET }} run: | cd OctoBot python setup.py build_ext --inplace diff --git a/Trading/Exchange/binance/tests/test_sandbox.py b/Trading/Exchange/binance/tests/test_sandbox.py index aeacdfc65..66c9e996a 100644 --- a/Trading/Exchange/binance/tests/test_sandbox.py +++ b/Trading/Exchange/binance/tests/test_sandbox.py @@ -20,6 +20,7 @@ import octobot_commons.tests as commons_tests import octobot_commons.constants as commons_constants import octobot_trading.util.test_tools.spot_rest_exchange_test_tools as spot_rest_exchange_test_tools +import octobot_commons.configuration as configuration from ...binance import Binance # All test coroutines will be treated as marked. @@ -29,8 +30,10 @@ async def test_spot_rest(): config = commons_tests.load_test_config() config[commons_constants.CONFIG_EXCHANGES][Binance.get_name()] = { - commons_constants.CONFIG_EXCHANGE_KEY: os.getenv(f"{Binance.get_name()}_API_KEY".upper()), - commons_constants.CONFIG_EXCHANGE_SECRET: os.getenv(f"{Binance.get_name()}_API_SECRET".upper()) + commons_constants.CONFIG_EXCHANGE_KEY: configuration.encrypt( + os.getenv(f"{Binance.get_name()}_API_KEY".upper())).decode(), + commons_constants.CONFIG_EXCHANGE_SECRET: configuration.encrypt( + os.getenv(f"{Binance.get_name()}_API_SECRET".upper())).decode() } config[commons_constants.CONFIG_TRADER][commons_constants.CONFIG_ENABLED_OPTION] = True config[commons_constants.CONFIG_SIMULATOR][commons_constants.CONFIG_ENABLED_OPTION] = False