diff --git a/Jenkinsfile b/Jenkinsfile index c0006c9..20eb74e 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -4,5 +4,6 @@ def pipeline = new org.docker.AppPipeline(steps: this, dockerImageName: 'sora2/pricing-server', dockerRegistryCred: 'bot-sora2-rw', secretScannerExclusion: '.*docker-compose.yml', + dockerImageTags: ['fix/liquidity-proxy-none-quote-handling':'fix-quote'], gitUpdateSubmodule: true) pipeline.runPipeline() diff --git a/run_node_processing.py b/run_node_processing.py index 886b8f1..b502c92 100644 --- a/run_node_processing.py +++ b/run_node_processing.py @@ -489,8 +489,11 @@ def get_end(substrate: SubstrateInterface): params = [0, XOR_ID, other_asset, '1000000000000000000', 'WithDesiredInput', [], 'Disabled', block_hash] result = substrate.rpc_request('liquidityProxy_quote', params) pair = pairs[swap[1], swap[2]] - amount = int(result['result']['amount']) / DENOM - pair.quote_price = amount if swap[1] == xor_id_int else 1 / amount + if result['result'] is not None: + amount = int(result['result']['amount']) / DENOM + pair.quote_price = amount if swap[1] == xor_id_int else 1 / amount + else: + pair.quote_price = None session.add(pair) parsed_swaps.append(swap[3]) if swap[0] == 1: @@ -499,8 +502,11 @@ def get_end(substrate: SubstrateInterface): params = [1, XSTUSD_ID, other_asset, '1000000000000000000', 'WithDesiredInput', [], 'Disabled', block_hash] result = substrate.rpc_request('liquidityProxy_quote', params) pair = pairs[swap[1], swap[2]] - amount = int(result['result']['amount']) / DENOM - pair.quote_price = amount if swap[1] == xstusd_id_int else 1 / amount + if result['result'] is not None: + amount = int(result['result']['amount']) / DENOM + pair.quote_price = amount if swap[1] == xstusd_id_int else 1 / amount + else: + pair.quote_price = None session.add(pair) parsed_swaps.append(swap[3]) if parsed_swaps or burns: