Skip to content
This repository was archived by the owner on Jan 22, 2026. It is now read-only.

Commit fe341b1

Browse files
committed
fix(dex): remove hardcoded bcdc fee percentage
1 parent e0682c1 commit fe341b1

3 files changed

Lines changed: 5 additions & 1 deletion

File tree

packages/blockchain-wallet-v4-frontend/src/scenes/Dex/Swap/components/QuoteDetails/QuoteDetails.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,9 @@ export const QuoteDetails = ({
160160
coin: props.swapQuote.quote.sellAmount.symbol,
161161
value: Exchange.convertCoinToCoin({
162162
coin: props.swapQuote.quote.sellAmount.symbol,
163-
value: (props.swapQuote.quote.sellAmount.amount / 100) * 0.9
163+
value:
164+
(props.swapQuote.quote.sellAmount.amount / 100) *
165+
props.swapQuote.quote.bcdcFeePercentage
164166
})
165167
})}
166168
</FiatDisplay>

packages/blockchain-wallet-v4/src/network/api/dex/schemas.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ const DexBcdcFeeSchema: z.ZodSchema<DexBcdcFee, z.ZodTypeDef, unknown> = z.objec
7272

7373
const DexQuoteSchema: z.ZodSchema<DexQuote, z.ZodTypeDef, unknown> = z.object({
7474
bcdcFee: DexBcdcFeeSchema,
75+
bcdcFeePercentage: stringToPositiveFloat,
7576
buyAmount: DexBuyAmountSchema,
7677
buyTokenFee: stringToPositiveFloat,
7778
price: stringToPositiveFloat,

packages/blockchain-wallet-v4/src/network/api/dex/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ export type DexBcdcFee = {
5151

5252
export type DexQuote = {
5353
bcdcFee: DexBcdcFee
54+
bcdcFeePercentage: number
5455
buyAmount: DexBuyAmount
5556
buyTokenFee: number
5657
price: number

0 commit comments

Comments
 (0)