Skip to content

Commit

Permalink
use amount_without_impact instead of amount (#93)
Browse files Browse the repository at this point in the history
* use amount_without_impact instead of amount

* Update Jenkinsfile

* Update Jenkinsfile

---------

Co-authored-by: f33r0 <[email protected]>
  • Loading branch information
HaidarJbeily7 and f33r0 authored Aug 1, 2024
1 parent f6509bc commit 6f4fc58
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions run_node_processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def get_fee_price(asset_id):
result = substrate.rpc_request("liquidityProxy_quote", params)
price = 0
if result["result"] is not None:
price = int(result["result"]["amount"]) / DENOM
price = int(result["result"]["amount_without_impact"]) / DENOM

SWAP_FEE_ASSETS[asset_id] = float(price)
return price
Expand Down Expand Up @@ -546,7 +546,7 @@ def get_end(substrate: SubstrateInterface):
result = substrate.rpc_request("liquidityProxy_quote", params)
pair = pairs[swap[1], swap[2]]
if result["result"] is not None:
pair.quote_price = int(result["result"]["amount"]) / DENOM
pair.quote_price = int(result["result"]["amount_without_impact"]) / DENOM
else:
pair.quote_price = None
session.add(pair)
Expand Down

0 comments on commit 6f4fc58

Please sign in to comment.