From 0ffa3290146bc405f97a64b0ea37cd4898aaaed9 Mon Sep 17 00:00:00 2001 From: Olivier Le Thanh Duong Date: Tue, 3 Sep 2024 15:56:22 +0200 Subject: [PATCH] RPC_BASE and RPC_AVAX proper description and default --- src/aleph/vm/conf.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/aleph/vm/conf.py b/src/aleph/vm/conf.py index 70c52fb3..3ef96127 100644 --- a/src/aleph/vm/conf.py +++ b/src/aleph/vm/conf.py @@ -228,14 +228,15 @@ class Settings(BaseSettings): # This address is the ALEPH SuperToken on SuperFluid Testnet PAYMENT_PRICING_AGGREGATE: str = "" # TODO: Missing + # Use to check PAYG payment RPC_AVAX: HttpUrl = Field( - default=None, - description="Replace chain RPC for AVAX", + default=STREAM_CHAINS[Chain.AVAX].rpc, + description="RPC API Endpoint for AVAX chain", ) RPC_BASE: HttpUrl = Field( - default=None, - description="Replace chain RPC for BASE", + default=STREAM_CHAINS[Chain.BASE].rpc, + description="RPC API Endpoint for BASE chain", ) PAYMENT_BUFFER: Decimal = Field( @@ -399,10 +400,8 @@ def setup(self): """Setup the environment defined by the settings. Call this method after loading the settings.""" # Update chain RPC - if self.RPC_BASE is not None: - STREAM_CHAINS[Chain.BASE].rpc = str(self.RPC_BASE) - if self.RPC_AVAX is not None: - STREAM_CHAINS[Chain.AVAX].rpc = str(self.RPC_AVAX) + STREAM_CHAINS[Chain.AVAX].rpc = str(self.RPC_AVAX) + STREAM_CHAINS[Chain.BASE].rpc = str(self.RPC_BASE) logger.info(STREAM_CHAINS)