Browse Source

Fix crash in null bolt11 descriptions

Changelog-Fixed: Fixed crashed on lightning invoices with empty descriptions
profile-edit
William Casarin 2 years ago
parent
commit
5fdcecd44f
  1. 6
      damus/Models/Mentions.swift

6
damus/Models/Mentions.swift

@ -189,7 +189,11 @@ func convert_invoice_block(_ b: invoice_block) -> Block? {
return nil
}
let description = String(cString: b11.description)
var description = ""
if b11.description != nil {
description = String(cString: b11.description)
}
guard let msat = maybe_pointee(b11.msat) else {
return nil
}

Loading…
Cancel
Save