Skip to content

Commit

Permalink
fixup! Feature: Internal account management + fix on _load_account to…
Browse files Browse the repository at this point in the history
… handle SolAccount
  • Loading branch information
1yam committed Sep 30, 2024
1 parent 7e7f83a commit 0b545d3
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/aleph/sdk/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class Settings(BaseSettings):
)

PRIVATE_KEY_STRING: Optional[str] = None
API_HOST: str = "https://api2.aleph.im/"
API_HOST: str = "https://api2.aleph.im"
MAX_INLINE_SIZE: int = 50000
API_UNIX_SOCKET: Optional[str] = None
REMOTE_CRYPTO_HOST: Optional[str] = None
Expand Down Expand Up @@ -167,3 +167,13 @@ class Config:
settings.PRIVATE_MNEMONIC_FILE = Path(
settings.CONFIG_HOME, "private-keys", "substrate.mnemonic"
)

# Update CHAINS settings and remove placeholders
CHAINS_ENV = [(key[7:], value) for key, value in settings if key.startswith("CHAINS_")]
for fields, value in CHAINS_ENV:
if value:
chain, field = fields.split("_", 1)
chain = chain if chain not in Chain.__members__ else Chain[chain]
field = field.lower()
settings.CHAINS[chain].__dict__[field] = value
settings.__delattr__(f"CHAINS_{fields}")

0 comments on commit 0b545d3

Please sign in to comment.