@@ -796,19 +796,15 @@ describe('ActivityListItemRow — row content', () => {
796796 /> ,
797797 ) . getByTestId ( 'activity-title-0xfail' ) ;
798798
799- // Cancelled → same neutral color as an ordinary row; the spaced " — Canceled"
800- // suffix still conveys the status. Failed → a distinct (error) color.
801799 expect ( flattenColor ( cancelled ) ) . toBe ( flattenColor ( neutral ) ) ;
802800 expect ( flattenColor ( failed ) ) . not . toBe ( flattenColor ( neutral ) ) ;
803801 expect ( cancelled . props . children ) . toBe (
804- `${ strings ( 'transactions.activity_limit_short' ) } — ${ strings (
805- 'transaction.canceled' ,
806- ) } `,
802+ strings ( 'transactions.activity_limit_short' ) ,
807803 ) ;
808804 } ) ;
809805
810- it ( 'renders limit orders with the market logo, no network badge, and a $ amount' , ( ) => {
811- const { getByTestId } = render (
806+ it ( 'renders limit orders with the market logo, no network badge, and a status label (not a notional amount) ' , ( ) => {
807+ const { getByTestId, queryByTestId } = render (
812808 < ActivityListItemRow
813809 item = { makeLimitOrder ( 'cancelled' , '0xlimit' ) }
814810 index = { 0 }
@@ -820,14 +816,89 @@ describe('ActivityListItemRow — row content', () => {
820816 expect ( logo . props . symbol ) . toBe ( 'BTC' ) ;
821817 // Perps is single-network (Arbitrum) → no network badge is resolved.
822818 expect ( getNetworkImageSource ) . not . toHaveBeenCalled ( ) ;
823- // Fiat-style amount ("$"), not the "<amount> USD" token suffix.
824- const primary = getByTestId ( 'activity-primary-amount-0xlimit' ) . props
825- . children as string ;
826- expect ( primary ) . toContain ( '$' ) ;
827- expect ( primary ) . not . toContain ( 'USD' ) ;
828- expect ( primary . startsWith ( '-' ) ) . toBe ( true ) ;
819+
820+ expect ( queryByTestId ( 'activity-secondary-amount-0xlimit' ) ) . toBeNull ( ) ;
821+ expect ( getByTestId ( 'activity-primary-amount-0xlimit' ) . props . children ) . toBe (
822+ strings ( 'transactions.activity_order_status_canceled' ) ,
823+ ) ;
829824 } ) ;
830825
826+ it . each ( [
827+ [ 'success' , 'activity_order_status_filled' ] ,
828+ [ 'cancelled' , 'activity_order_status_canceled' ] ,
829+ [ 'failed' , 'activity_order_status_rejected' ] ,
830+ [ 'pending' , 'activity_order_status_open' ] ,
831+ ] as const ) (
832+ 'shows the order status label "%s" in the right column instead of an amount' ,
833+ ( status , i18nKey ) => {
834+ const { getByTestId, queryByTestId } = render (
835+ < ActivityListItemRow
836+ item = { makeLimitOrder ( status , `0x${ status } ` ) }
837+ index = { 0 }
838+ /> ,
839+ ) ;
840+
841+ expect ( queryByTestId ( `activity-secondary-amount-0x${ status } ` ) ) . toBeNull ( ) ;
842+ expect (
843+ getByTestId ( `activity-primary-amount-0x${ status } ` ) . props . children ,
844+ ) . toBe ( strings ( `transactions.${ i18nKey } ` ) ) ;
845+ } ,
846+ ) ;
847+
848+ it ( 'renders the order status muted (matches the extension TextMuted), distinct from a normal amount color' , ( ) => {
849+ const orderStatus = flattenColor (
850+ render (
851+ < ActivityListItemRow
852+ item = { makeLimitOrder ( 'success' , '0xmuted' ) }
853+ index = { 0 }
854+ /> ,
855+ ) . getByTestId ( 'activity-primary-amount-0xmuted' ) ,
856+ ) ;
857+ const normalAmount = flattenColor (
858+ render (
859+ < ActivityListItemRow
860+ item = { makeItem ( {
861+ type : 'send' ,
862+ status : 'success' ,
863+ token : { amount : '1' , symbol : 'ETH' , direction : 'out' } ,
864+ } ) }
865+ index = { 1 }
866+ /> ,
867+ ) . getByTestId ( 'activity-primary-amount-0xabc' ) ,
868+ ) ;
869+
870+ // Muted status color is applied and differs from the default amount color.
871+ expect ( orderStatus ) . not . toBe ( normalAmount ) ;
872+ } ) ;
873+
874+ it . each ( [
875+ [ 'cancelled' , 'transaction.canceled' ] ,
876+ [ 'failed' , 'transaction.failed' ] ,
877+ ] as const ) (
878+ 'keeps the "— status" suffix on non-order domain rows (%s deposit)' ,
879+ ( status , i18nKey ) => {
880+ const { getByTestId } = render (
881+ < ActivityListItemRow
882+ item = { makeItem ( {
883+ type : 'perpsAddFunds' ,
884+ status,
885+ hash : `0xfunds-${ status } ` ,
886+ } ) }
887+ index = { 0 }
888+ /> ,
889+ ) ;
890+
891+ // Unlike orders, funds/predict rows still carry the status in the title.
892+ expect (
893+ getByTestId ( `activity-title-0xfunds-${ status } ` ) . props . children ,
894+ ) . toBe (
895+ `${ strings ( 'transactions.activity_perps_account_funded' ) } — ${ strings (
896+ i18nKey ,
897+ ) } `,
898+ ) ;
899+ } ,
900+ ) ;
901+
831902 it ( 'colors a perps trade loss with the error color and a gain with the incoming color' , ( ) => {
832903 const makeClose = (
833904 direction : 'in' | 'out' ,
@@ -851,16 +922,9 @@ describe('ActivityListItemRow — row content', () => {
851922 const gain = render (
852923 < ActivityListItemRow item = { makeClose ( 'in' , '0xgain' ) } index = { 1 } /> ,
853924 ) . getByTestId ( 'activity-primary-amount-0xgain' ) ;
854- // An order amount (notional, not PnL) stays neutral even though outgoing.
855- const order = render (
856- < ActivityListItemRow
857- item = { makeLimitOrder ( 'cancelled' , '0xorder' ) }
858- index = { 2 }
859- /> ,
860- ) . getByTestId ( 'activity-primary-amount-0xorder' ) ;
861925
862926 // Loss shares the error color used for a failed title; gain shares the green
863- // used for an incoming receive amount; the order amount matches neither .
927+ // used for an incoming receive amount.
864928 const errorColor = flattenColor (
865929 render (
866930 < ActivityListItemRow
@@ -884,8 +948,6 @@ describe('ActivityListItemRow — row content', () => {
884948
885949 expect ( flattenColor ( loss ) ) . toBe ( errorColor ) ;
886950 expect ( flattenColor ( gain ) ) . toBe ( incomingColor ) ;
887- expect ( flattenColor ( order ) ) . not . toBe ( errorColor ) ;
888- expect ( flattenColor ( order ) ) . not . toBe ( incomingColor ) ;
889951 } ) ;
890952
891953 it ( 'strips the HyperLiquid builder prefix from the trade subtitle' , ( ) => {
@@ -1763,6 +1825,11 @@ const ALL_KINDS: ActivityListItem['type'][] = [
17631825 'marketCloseShort' ,
17641826 'limitShort' ,
17651827 'limitCloseShort' ,
1828+ 'marketLong' ,
1829+ 'stopMarketCloseLong' ,
1830+ 'marketCloseLong' ,
1831+ 'limitLong' ,
1832+ 'limitCloseLong' ,
17661833] ;
17671834
17681835const EXPECTED_TITLES = {
@@ -1838,6 +1905,11 @@ const EXPECTED_TITLES = {
18381905 marketCloseShort : strings ( 'transactions.activity_market_close_short' ) ,
18391906 limitShort : strings ( 'transactions.activity_limit_short' ) ,
18401907 limitCloseShort : strings ( 'transactions.activity_limit_close_short' ) ,
1908+ marketLong : strings ( 'transactions.activity_market_long' ) ,
1909+ stopMarketCloseLong : strings ( 'transactions.activity_stop_market_close_long' ) ,
1910+ marketCloseLong : strings ( 'transactions.activity_market_close_long' ) ,
1911+ limitLong : strings ( 'transactions.activity_limit_long' ) ,
1912+ limitCloseLong : strings ( 'transactions.activity_limit_close_long' ) ,
18411913} satisfies Record < ActivityListItem [ 'type' ] , string > ;
18421914
18431915describe ( 'ActivityListItemRow — title display for all ActivityKind values' , ( ) => {
0 commit comments