From 54db1668625bd143400ae0d417dca00a5ad1f6c6 Mon Sep 17 00:00:00 2001 From: Bill He Date: Mon, 25 Sep 2023 14:04:18 -0400 Subject: [PATCH] add into reciept --- src/constants/tooltips/trade.ts | 4 ++++ .../forms/TradeForm/PlaceOrderButtonAndReceipt.tsx | 14 +++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/constants/tooltips/trade.ts b/src/constants/tooltips/trade.ts index 339df58..f863f4f 100644 --- a/src/constants/tooltips/trade.ts +++ b/src/constants/tooltips/trade.ts @@ -94,6 +94,10 @@ export const tradeTooltips: TooltipStrings = { title: stringGetter({ key: TOOLTIP_STRING_KEYS.MAINTENANCE_MARGIN_FRACTION_TITLE }), body: stringGetter({ key: TOOLTIP_STRING_KEYS.MAINTENANCE_MARGIN_FRACTION_BODY }), }), + 'max-reward': ({ stringGetter }) => ({ + title: stringGetter({ key: TOOLTIP_STRING_KEYS.MAXIMUM_REWARDS_TITLE }), + body: stringGetter({ key: TOOLTIP_STRING_KEYS.MAXIMUM_REWARDS_BODY }), + }), 'max-withdraw': ({ stringGetter }) => ({ title: stringGetter({ key: TOOLTIP_STRING_KEYS.MAX_WITHDRAW_TITLE }), body: stringGetter({ key: TOOLTIP_STRING_KEYS.MAX_WITHDRAW_BODY }), diff --git a/src/views/forms/TradeForm/PlaceOrderButtonAndReceipt.tsx b/src/views/forms/TradeForm/PlaceOrderButtonAndReceipt.tsx index 522128f..ef434d0 100644 --- a/src/views/forms/TradeForm/PlaceOrderButtonAndReceipt.tsx +++ b/src/views/forms/TradeForm/PlaceOrderButtonAndReceipt.tsx @@ -9,6 +9,7 @@ import { TRADE_TYPE_STRINGS, MobilePlaceOrderSteps } from '@/constants/trade'; import { useStringGetter } from '@/hooks'; +import { AssetIcon } from '@/components/AssetIcon'; import { Button } from '@/components/Button'; import { Output, OutputType, ShowSign } from '@/components/Output'; import { WithDetailsReceipt } from '@/components/WithDetailsReceipt'; @@ -62,7 +63,7 @@ export const PlaceOrderButtonAndReceipt = ({ const selectedTradeType = getSelectedTradeType(type); const selectedOrderSide = getSelectedOrderSide(side); - const { fee, price: expectedPrice, total } = summary || {}; + const { fee, price: expectedPrice, total, reward } = summary || {}; const items = [ { @@ -79,6 +80,17 @@ export const PlaceOrderButtonAndReceipt = ({ label: stringGetter({ key: STRING_KEYS.FEE }), value: , }, + { + key: 'max-reward', + label: ( + <> + {stringGetter({ key: STRING_KEYS.MAXIMUM_REWARDS })} + {/* */} + + ), + value: , + tooltip: 'max-reward', + }, { key: 'total', label: stringGetter({ key: STRING_KEYS.TOTAL }),