File tree 1 file changed +2
-2
lines changed
src/lib/mocking/middleware-functions
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -117,14 +117,14 @@ const handleTransferIlp = (context, response) => {
117
117
const pathMatch = / \/ t r a n s f e r s \/ ( [ ^ / ] + ) $ /
118
118
if ( context . request . method === 'post' && response . method === 'put' && pathMatch . test ( response . path ) ) {
119
119
if ( response . eventInfo && response . eventInfo . params && response . eventInfo . params . body &&
120
- response . eventInfo . params . body . fulfilment ) {
120
+ ( response . eventInfo . params . body . fulfilment || response . eventInfo . params . body . TxInfAndSts . ExctnConf ) ) {
121
121
return null
122
122
}
123
123
if ( context . request . body . ilpPacket ) {
124
124
const generatedFulfilment = ilpObj . calculateFulfil ( context . request . body . ilpPacket ) . replace ( '"' , '' )
125
125
response . body . fulfilment = generatedFulfilment
126
126
}
127
- if ( context . request . body . CdtTrfTxInf ) {
127
+ if ( context . request . body . CdtTrfTxInf ?. VrfctnOfTerms ?. IlpV4PrepPacket ) {
128
128
const generatedFulfilment = ilpV4Obj . calculateFulfil ( context . request . body . CdtTrfTxInf . VrfctnOfTerms . IlpV4PrepPacket ) . replace ( '"' , '' )
129
129
response . body . TxInfAndSts . ExctnConf = generatedFulfilment
130
130
}
You can’t perform that action at this time.
0 commit comments