diff --git a/services/gunDB/contact-api/actions.js b/services/gunDB/contact-api/actions.js index 176b855e..b64887a8 100644 --- a/services/gunDB/contact-api/actions.js +++ b/services/gunDB/contact-api/actions.js @@ -996,6 +996,14 @@ const sendSpontaneousPayment = async (to, amount, memo, feeLimit) => { v => !Schema.isOrderResponse(v) ) + if (!Schema.isOrderResponse(encryptedOrderRes)) { + const e = TypeError( + `Expected OrderResponse got: ${typeof encryptedOrderRes}` + ) + logger.error(e) + throw e + } + /** @type {import('shock-common').Schema.OrderResponse} */ const orderResponse = { response: await SEA.decrypt(encryptedOrderRes.response, ourSecret),