@@ -180,6 +180,19 @@ fileprivate struct DetailsInfoGrid: InfoGridView {
180180 paymentRequest_invoice ( paymentRequest)
181181 }
182182 }
183+
184+ #if DEBUG
185+ if let metadata = incomingPayment. incomingOfferMetadataV2 ( ) {
186+
187+ InlineSection {
188+ header ( " BLIP 42 (DEBUG build only) " )
189+ } content: {
190+ blip42_contactSecret ( metadata. contactSecret)
191+ blip42_offer ( metadata. payerOffer)
192+ blip42_address ( metadata. payerAddress)
193+ }
194+ }
195+ #endif
183196
184197 if let received = incomingPayment. received {
185198
@@ -274,6 +287,19 @@ fileprivate struct DetailsInfoGrid: InfoGridView {
274287 }
275288 }
276289
290+ #if DEBUG
291+ if let request = outgoingPayment. outgoingInvoiceRequest ( ) {
292+
293+ InlineSection {
294+ header ( " BLIP 42 (DEBUG build only) " )
295+ } content: {
296+ blip42_contactSecret ( request. contactSecret)
297+ blip42_offer ( request. payerOffer)
298+ blip42_address ( request. payerAddress)
299+ }
300+ }
301+ #endif
302+
277303 } else if let spliceOut = outgoingPayment as? Lightning_kmpSpliceOutgoingPayment {
278304
279305 InlineSection {
@@ -1163,6 +1189,81 @@ fileprivate struct DetailsInfoGrid: InfoGridView {
11631189 common_channelId ( payment. channelId)
11641190 }
11651191
1192+ @ViewBuilder
1193+ func blip42_contactSecret(
1194+ _ secret: Bitcoin_kmpByteVector32 ?
1195+ ) -> some View {
1196+ let identifier : String = #function
1197+
1198+ InfoGridRowWrapper (
1199+ identifier: identifier,
1200+ keyColumnWidth: keyColumnWidth ( identifier: identifier)
1201+ ) {
1202+ keyColumn ( " contact secret " )
1203+
1204+ } valueColumn: {
1205+
1206+ if let str = secret? . toHex ( ) {
1207+ Text ( str)
1208+ . lineLimit ( 2 )
1209+ . truncationMode ( . middle)
1210+ } else {
1211+ Text ( verbatim: " <null> " )
1212+ . foregroundStyle ( Color . secondary)
1213+ }
1214+ }
1215+ }
1216+
1217+ @ViewBuilder
1218+ func blip42_offer(
1219+ _ offer: Lightning_kmpOfferTypesOffer ?
1220+ ) -> some View {
1221+ let identifier : String = #function
1222+
1223+ InfoGridRowWrapper (
1224+ identifier: identifier,
1225+ keyColumnWidth: keyColumnWidth ( identifier: identifier)
1226+ ) {
1227+ keyColumn ( " payer offer " )
1228+
1229+ } valueColumn: {
1230+
1231+ if let str = offer? . encode ( ) {
1232+ Text ( str)
1233+ . lineLimit ( 2 )
1234+ . truncationMode ( . middle)
1235+ } else {
1236+ Text ( verbatim: " <null> " )
1237+ . foregroundStyle ( Color . secondary)
1238+ }
1239+ }
1240+ }
1241+
1242+ @ViewBuilder
1243+ func blip42_address(
1244+ _ address: Lightning_kmpContactAddress ?
1245+ ) -> some View {
1246+ let identifier : String = #function
1247+
1248+ InfoGridRowWrapper (
1249+ identifier: identifier,
1250+ keyColumnWidth: keyColumnWidth ( identifier: identifier)
1251+ ) {
1252+ keyColumn ( " payer address " )
1253+
1254+ } valueColumn: {
1255+
1256+ if let str = address? . description ( ) {
1257+ Text ( str)
1258+ . lineLimit ( 2 )
1259+ . truncationMode ( . middle)
1260+ } else {
1261+ Text ( verbatim: " <null> " )
1262+ . foregroundStyle ( Color . secondary)
1263+ }
1264+ }
1265+ }
1266+
11661267 // --------------------------------------------------
11671268 // MARK: View Builders: Common Rows
11681269 // --------------------------------------------------
0 commit comments