Skip to content

Commit

Permalink
fix: review feedbacks
Browse files Browse the repository at this point in the history
  • Loading branch information
NeOMakinG committed Jan 14, 2025
1 parent 59292a5 commit 0cec0f9
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,8 @@ export const getQuoteOrRate = async (
singleQuoteResponse.boostQuote.egressAmountNative!,
)

// This is not really a buyAmount before fees but rather an input/output calculation to get the sell amount
// prorated to the buy asset price to determine price impact
const buyAmountBeforeFeesCryptoBaseUnit = toBaseUnit(
bnOrZero(singleQuoteResponse.boostQuote.ingressAmount!).times(
singleQuoteResponse.estimatedPrice!,
Expand Down Expand Up @@ -356,6 +358,8 @@ export const getQuoteOrRate = async (
singleQuoteResponse.egressAmountNative!,
)

// This is not really a buyAmount before fees but rather an input/output calculation to get the sell amount
// prorated to the buy asset price to determine price impact
const buyAmountBeforeFeesCryptoBaseUnit = toBaseUnit(
bnOrZero(singleQuoteResponse.ingressAmount!).times(singleQuoteResponse.estimatedPrice!),
buyAsset.precision,
Expand Down

0 comments on commit 0cec0f9

Please sign in to comment.