Skip to content

Commit

Permalink
fix(dex): remove hardcoded bcdc fee percentage
Browse files Browse the repository at this point in the history
  • Loading branch information
jjBlockchain committed May 1, 2024
1 parent e0682c1 commit fe341b1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,9 @@ export const QuoteDetails = ({
coin: props.swapQuote.quote.sellAmount.symbol,
value: Exchange.convertCoinToCoin({
coin: props.swapQuote.quote.sellAmount.symbol,
value: (props.swapQuote.quote.sellAmount.amount / 100) * 0.9
value:
(props.swapQuote.quote.sellAmount.amount / 100) *
props.swapQuote.quote.bcdcFeePercentage
})
})}
</FiatDisplay>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ const DexBcdcFeeSchema: z.ZodSchema<DexBcdcFee, z.ZodTypeDef, unknown> = z.objec

const DexQuoteSchema: z.ZodSchema<DexQuote, z.ZodTypeDef, unknown> = z.object({
bcdcFee: DexBcdcFeeSchema,
bcdcFeePercentage: stringToPositiveFloat,
buyAmount: DexBuyAmountSchema,
buyTokenFee: stringToPositiveFloat,
price: stringToPositiveFloat,
Expand Down
1 change: 1 addition & 0 deletions packages/blockchain-wallet-v4/src/network/api/dex/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ export type DexBcdcFee = {

export type DexQuote = {
bcdcFee: DexBcdcFee
bcdcFeePercentage: number
buyAmount: DexBuyAmount
buyTokenFee: number
price: number
Expand Down

0 comments on commit fe341b1

Please sign in to comment.