@@ -22,7 +22,7 @@ import i18n from '../../../../i18n/testConfigEnglish'
2222import SocketContext from '../../../shared/SocketContext'
2323import { VaultHeader } from '../index'
2424import { queryClient } from '../../../shared/QueryClient'
25- import { getLedgerEntry } from '../../../../rippled/lib/rippled'
25+ import { getMPTIssuance } from '../../../../rippled/lib/rippled'
2626import Mock = jest . Mock
2727
2828// Mock the rippled library to control API responses
@@ -48,7 +48,7 @@ jest.mock('../../../shared/hooks/useTokenToUSDRate', () => ({
4848 } ,
4949} ) )
5050
51- const mockedGetLedgerEntry = getLedgerEntry as Mock
51+ const mockedGetMPTIssuance = getMPTIssuance as Mock
5252
5353// Mock socket client - represents the WebSocket connection to rippled
5454const mockSocket = { } as any
@@ -83,7 +83,7 @@ describe('VaultHeader Component', () => {
8383 cleanup ( )
8484
8585 // Default mock: no MPT issuance data (vault credential)
86- mockedGetLedgerEntry . mockResolvedValue ( { node : null } )
86+ mockedGetMPTIssuance . mockResolvedValue ( { node : null } )
8787
8888 // Default mock: XRP to USD rate of 2.0 for predictable conversion tests
8989 mockXRPToUSDRate . mockReturnValue ( 2.0 )
@@ -800,12 +800,12 @@ describe('VaultHeader Component', () => {
800800 describe ( 'Vault Credential Display' , ( ) => {
801801 it ( 'displays vault credential when DomainID is present' , async ( ) => {
802802 const domainId = 'credential123abc'
803- mockedGetLedgerEntry . mockResolvedValue ( {
803+ mockedGetMPTIssuance . mockResolvedValue ( {
804804 node : { DomainID : domainId } ,
805805 } )
806806
807807 const vaultData = {
808- Owner : 'rTestOwner ' ,
808+ Account : 'rTestAccount ' ,
809809 Asset : { currency : 'XRP' } ,
810810 ShareMPTID : 'shareMptId123' ,
811811 }
@@ -828,7 +828,7 @@ describe('VaultHeader Component', () => {
828828 } )
829829
830830 it ( 'does not display credential row when DomainID is absent' , async ( ) => {
831- mockedGetLedgerEntry . mockResolvedValue ( {
831+ mockedGetMPTIssuance . mockResolvedValue ( {
832832 node : { } , // No DomainID
833833 } )
834834
@@ -873,8 +873,8 @@ describe('VaultHeader Component', () => {
873873 </ TestWrapper > ,
874874 )
875875
876- // getLedgerEntry should not be called without ShareMPTID
877- expect ( mockedGetLedgerEntry ) . not . toHaveBeenCalled ( )
876+ // getMPTIssuance should not be called without ShareMPTID
877+ expect ( mockedGetMPTIssuance ) . not . toHaveBeenCalled ( )
878878 } )
879879 } )
880880
0 commit comments