Skip to content

Commit 47a9654

Browse files
committed
Force-unwrap preimage
1 parent bb5abf1 commit 47a9654

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ci/LDKSwift/Tests/LDKSwiftTests/HumanObjectPeerTestInstance.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -707,7 +707,7 @@ public class HumanObjectPeerTestInstance {
707707
return XCTAssert(false, "Expected .InvoicePayment, got \(paymentPurpose.getValueType())")
708708
}
709709
let invoicePayment = paymentPurpose.getValueAsInvoicePayment()!
710-
let preimage = invoicePayment.getPaymentPreimage()
710+
let preimage = invoicePayment.getPaymentPreimage()!
711711
let secret = invoicePayment.getPaymentSecret()
712712
if self.configuration.shouldRecipientRejectPayment {
713713
print("about to fail payment because shouldRecipientRejectPayment flag is set")
@@ -830,7 +830,7 @@ public class HumanObjectPeerTestInstance {
830830
return XCTAssert(false, "Expected .InvoicePayment, got \(paymentPurpose.getValueType())")
831831
}
832832
let invoicePayment = paymentPurpose.getValueAsInvoicePayment()!
833-
let preimage = invoicePayment.getPaymentPreimage()
833+
let preimage = invoicePayment.getPaymentPreimage()!
834834
let secret = invoicePayment.getPaymentSecret()
835835
peer1.channelManager.claimFunds(paymentPreimage: preimage)
836836
print("claimed payment with secret \(secret) using preimage \(preimage)")

0 commit comments

Comments
 (0)