File tree Expand file tree Collapse file tree
app/components/UI/Rewards/components/Tabs/MusdCalculatorTab Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -122,7 +122,9 @@ describe('MusdCalculatorTab', () => {
122122 } ) ;
123123
124124 it ( 'updates amount and earnings when the track is pressed' , async ( ) => {
125- const { getByTestId, getByText } = render ( < MusdCalculatorTab /> ) ;
125+ const { getByTestId, getByText, queryByText } = render (
126+ < MusdCalculatorTab /> ,
127+ ) ;
126128 const track = getByTestId ( 'musd-slider-track' ) ;
127129
128130 fireEvent ( track , 'layout' , {
@@ -138,6 +140,12 @@ describe('MusdCalculatorTab', () => {
138140 expect ( getByTestId ( 'musd-slider-amount-display' ) ) . toHaveTextContent (
139141 '$5,000' ,
140142 ) ;
143+ expect (
144+ getByText ( / r e w a r d s \. m u s d \. e a r n i n g s _ p e r _ d a y _ s u f f i x / ) ,
145+ ) . toBeOnTheScreen ( ) ;
146+ expect (
147+ queryByText ( / r e w a r d s \. m u s d \. e a r n i n g s _ p e r _ m o n t h _ s u f f i x / ) ,
148+ ) . toBeNull ( ) ;
141149 expect ( getByText ( / \$ 0 \. 4 1 / ) ) . toBeOnTheScreen ( ) ;
142150 expect ( getByText ( / \$ 1 5 0 / ) ) . toBeOnTheScreen ( ) ;
143151 } ) ;
Original file line number Diff line number Diff line change @@ -114,10 +114,6 @@ const MusdCalculatorTab: React.FC = () => {
114114 ) ;
115115
116116 const yearlyEarnings = useMemo ( ( ) => amount * MUSD_CALCULATOR_APY , [ amount ] ) ;
117- const monthlyEarnings = useMemo (
118- ( ) => ( amount * MUSD_CALCULATOR_APY ) / 12 ,
119- [ amount ] ,
120- ) ;
121117 const dailyEarnings = useMemo (
122118 ( ) => ( amount * MUSD_CALCULATOR_APY ) / 365 ,
123119 [ amount ] ,
@@ -306,14 +302,6 @@ const MusdCalculatorTab: React.FC = () => {
306302 justifyContent = { BoxJustifyContent . Center }
307303 twClassName = "gap-2"
308304 >
309- < Text
310- variant = { TextVariant . BodySm }
311- color = { TextColor . TextAlternative }
312- fontWeight = { FontWeight . Medium }
313- >
314- { formatCurrency ( monthlyEarnings ) }
315- { strings ( 'rewards.musd.earnings_per_month_suffix' ) }
316- </ Text >
317305 < Text
318306 variant = { TextVariant . BodySm }
319307 color = { TextColor . TextAlternative }
Original file line number Diff line number Diff line change 84098409 "yearly_positive_prefix" : " +" ,
84108410 "earnings_per_year_suffix" : " /yr" ,
84118411 "earnings_per_month_suffix" : " /mo" ,
8412- "earnings_per_day_suffix" : " /day" ,
8412+ "earnings_per_day_suffix" : " /day claimable daily " ,
84138413 "slider_amount_label" : " Amount" ,
8414- "disclaimer_calculator" : " Calculation based on {{apy}}% APY. Bonus rate may change. Paid daily, claimable any time ." ,
8414+ "disclaimer_calculator" : " Estimate based on 3% bonus. Rate may change. Claimable anytime ." ,
84158415 "buy_button" : " Buy mUSD" ,
84168416 "swap_button" : " Swap to mUSD"
84178417 },
You can’t perform that action at this time.
0 commit comments