File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88 ChronikBlockchainClient ,
99 multiBlockchainClient
1010} from '../../services/chronikService'
11- import { Address } from '@prisma/client'
11+ import { Address , Prisma } from '@prisma/client'
1212import { fetchAddressesArray } from '../../services/addressService'
1313import { fetchUnconfirmedTransactions , deleteTransactions , upsertTransaction } from '../../services/transactionService'
1414import { executeAddressTriggers } from '../../services/triggerService'
@@ -1403,14 +1403,22 @@ describe('WS onMessage matrix (no re-mocks)', () => {
14031403 . mockReturnValue ( [ 'ecash:qqkv9wr69ry2p9l53lxp635va4h86wv435995w8p2h' ] )
14041404
14051405 // minimal transaction shape for downstream
1406+ // Note: getTransactionFromChronikTransaction is now synchronous, so use mockReturnValue
14061407 jest . spyOn ( client , 'getTransactionFromChronikTransaction' )
1407- . mockResolvedValue ( {
1408+ . mockReturnValue ( {
14081409 hash : 'txCONF' ,
1409- amount : '0.01' ,
1410+ amount : new Prisma . Decimal ( '0.01' ) ,
14101411 timestamp : Math . floor ( Date . now ( ) / 1000 ) ,
14111412 addressId : 'addr-1' ,
1412- confirmed : false ,
1413- opReturn : JSON . stringify ( { message : { type : 'PAY' , paymentId : 'pid-1' } } )
1413+ confirmed : true ,
1414+ orphaned : false ,
1415+ opReturn : JSON . stringify ( { message : { type : 'PAY' , paymentId : 'pid-1' } } ) ,
1416+ inputs : {
1417+ create : [ ]
1418+ } ,
1419+ outputs : {
1420+ create : [ ]
1421+ }
14141422 } )
14151423
14161424 const paySpy = jest . spyOn ( client , 'handleUpdateClientPaymentStatus' )
You can’t perform that action at this time.
0 commit comments