validate after retry routine

This commit is contained in:
Daniel Lugo 2020-08-26 20:32:44 -04:00
parent 8616e1fdef
commit 89f15c8197

View file

@ -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),