@@ -13,6 +13,8 @@ pub enum Error {
1313 ConnectionFailed ,
1414 /// Invoice creation failed.
1515 InvoiceCreationFailed ,
16+ /// Offer creation failed.
17+ OfferCreationFailed ,
1618 /// Sending a payment has failed.
1719 PaymentSendingFailed ,
1820 /// Sending a payment probe has failed.
@@ -61,12 +63,16 @@ pub enum Error {
6163 InvalidAmount ,
6264 /// The given invoice is invalid.
6365 InvalidInvoice ,
66+ /// The given offer is invalid.
67+ InvalidOffer ,
6468 /// The given channel ID is invalid.
6569 InvalidChannelId ,
6670 /// The given network is invalid.
6771 InvalidNetwork ,
6872 /// A payment with the given hash has already been initiated.
6973 DuplicatePayment ,
74+ /// The provided offer was denonminated in an unsupported currency.
75+ UnsupportedCurrency ,
7076 /// The available funds are insufficient to complete the given operation.
7177 InsufficientFunds ,
7278 /// The given operation failed due to the required liquidity source being unavailable.
@@ -85,6 +91,7 @@ impl fmt::Display for Error {
8591 } ,
8692 Self :: ConnectionFailed => write ! ( f, "Network connection closed." ) ,
8793 Self :: InvoiceCreationFailed => write ! ( f, "Failed to create invoice." ) ,
94+ Self :: OfferCreationFailed => write ! ( f, "Failed to create offer." ) ,
8895 Self :: PaymentSendingFailed => write ! ( f, "Failed to send the given payment." ) ,
8996 Self :: ProbeSendingFailed => write ! ( f, "Failed to send the given payment probe." ) ,
9097 Self :: ChannelCreationFailed => write ! ( f, "Failed to create channel." ) ,
@@ -111,6 +118,7 @@ impl fmt::Display for Error {
111118 Self :: InvalidPaymentSecret => write ! ( f, "The given payment secret is invalid." ) ,
112119 Self :: InvalidAmount => write ! ( f, "The given amount is invalid." ) ,
113120 Self :: InvalidInvoice => write ! ( f, "The given invoice is invalid." ) ,
121+ Self :: InvalidOffer => write ! ( f, "The given offer is invalid." ) ,
114122 Self :: InvalidChannelId => write ! ( f, "The given channel ID is invalid." ) ,
115123 Self :: InvalidNetwork => write ! ( f, "The given network is invalid." ) ,
116124 Self :: DuplicatePayment => {
@@ -119,6 +127,9 @@ impl fmt::Display for Error {
119127 Self :: InsufficientFunds => {
120128 write ! ( f, "The available funds are insufficient to complete the given operation." )
121129 } ,
130+ Self :: UnsupportedCurrency => {
131+ write ! ( f, "The provided offer was denonminated in an unsupported currency." )
132+ } ,
122133 Self :: LiquiditySourceUnavailable => {
123134 write ! ( f, "The given operation failed due to the required liquidity source being unavailable." )
124135 } ,
0 commit comments