Skip to content

Commit

Permalink
fix(tsc): preimage validated to SettlementViaLn type
Browse files Browse the repository at this point in the history
  • Loading branch information
esaugomez31 committed Feb 27, 2025
1 parent d6626cb commit ad8a973
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/screens/send-bitcoin-screen/payment-details/lightning.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,12 +254,16 @@ export const createAmountLightningPaymentDetails = <T extends WalletCurrency>(
},
},
})
const { settlementVia } = data?.lnInvoicePaymentSend.transaction || {}

return {
status: data?.lnInvoicePaymentSend.status,
errors: data?.lnInvoicePaymentSend.errors,
extraInfo: {
preimage: data?.lnInvoicePaymentSend.transaction?.settlementVia.preImage,
preimage:
settlementVia?.__typename === "SettlementViaLn"
? settlementVia.preImage
: undefined,
},
}
}
Expand Down

0 comments on commit ad8a973

Please sign in to comment.