Updated secrets handle to load_or_fail
Some checks failed
Test Python / Test (push) Failing after 26s
Some checks failed
Test Python / Test (push) Failing after 26s
This commit is contained in:
parent
7541129786
commit
0c1d454c42
|
@ -12,7 +12,6 @@ import fin_depo
|
|||
|
||||
from . import (
|
||||
AutoSellConfig,
|
||||
config,
|
||||
log_results,
|
||||
order_csv,
|
||||
run_auto_sell,
|
||||
|
@ -65,10 +64,12 @@ Sells financial assets from an online account.
|
|||
def load_config(config_path: Path) -> AutoSellConfig:
|
||||
logger.info('Loading configuration')
|
||||
|
||||
from . import secrets_config
|
||||
|
||||
seller_backend = fin_depo.defi_kucoin.KucoinDepoFetcher(
|
||||
kucoin_secret=config.KUCOIN_SECRET,
|
||||
kucoin_key=config.KUCOIN_KEY,
|
||||
kucoin_pass=config.KUCOIN_PASS,
|
||||
kucoin_secret=secrets_config.KUCOIN_SECRET,
|
||||
kucoin_key=secrets_config.KUCOIN_KEY,
|
||||
kucoin_pass=secrets_config.KUCOIN_PASS,
|
||||
allow_trades=True,
|
||||
)
|
||||
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
import secret_loader
|
||||
|
||||
load_secret = secret_loader.SecretLoader().load
|
||||
|
||||
KUCOIN_KEY = load_secret('KUCOIN_KEY')
|
||||
KUCOIN_SECRET = load_secret('KUCOIN_SECRET')
|
||||
KUCOIN_PASS = load_secret('KUCOIN_PASS')
|
12
crypto_seller/secrets_config.py
Normal file
12
crypto_seller/secrets_config.py
Normal file
|
@ -0,0 +1,12 @@
|
|||
"""Handles secrets for the `crypto_seller` system."""
|
||||
from secret_loader import SecretLoader
|
||||
|
||||
__all__ = ['KUCOIN_KEY', 'KUCOIN_SECRET', 'KUCOIN_PASS']
|
||||
|
||||
secret_loader = SecretLoader()
|
||||
|
||||
KUCOIN_KEY = secret_loader.load_or_fail('KUCOIN_KEY')
|
||||
KUCOIN_SECRET = secret_loader.load_or_fail('KUCOIN_SECRET')
|
||||
KUCOIN_PASS = secret_loader.load_or_fail('KUCOIN_PASS')
|
||||
|
||||
del secret_loader
|
Loading…
Reference in New Issue
Block a user