@@ -11,32 +11,10 @@ pub enum Error {
1111 OnchainTxCreationFailed ,
1212 /// A network connection has been closed.
1313 ConnectionFailed ,
14- /// The given address is invalid.
15- AddressInvalid ,
16- /// The given public key is invalid.
17- PublicKeyInvalid ,
18- /// The given payment hash is invalid.
19- PaymentHashInvalid ,
20- /// The given payment preimage is invalid.
21- PaymentPreimageInvalid ,
22- /// The given payment secret is invalid.
23- PaymentSecretInvalid ,
24- /// Payment of the given invoice has already been intiated.
25- NonUniquePaymentHash ,
26- /// The given amount is invalid.
27- InvalidAmount ,
28- /// The given invoice is invalid.
29- InvalidInvoice ,
3014 /// Invoice creation failed.
3115 InvoiceCreationFailed ,
32- /// There are insufficient funds to complete the given operation.
33- InsufficientFunds ,
3416 /// An attempted payment has failed.
3517 PaymentFailed ,
36- /// The given channel ID is invalid.
37- ChannelIdInvalid ,
38- /// The given network is invalid.
39- NetworkInvalid ,
4018 /// A given peer info could not be parsed.
4119 PeerInfoParseFailed ,
4220 /// A channel could not be opened.
@@ -51,6 +29,28 @@ pub enum Error {
5129 WalletSigningFailed ,
5230 /// A transaction sync operation failed.
5331 TxSyncFailed ,
32+ /// The given address is invalid.
33+ InvalidAddress ,
34+ /// The given public key is invalid.
35+ InvalidPublicKey ,
36+ /// The given payment hash is invalid.
37+ InvalidPaymentHash ,
38+ /// The given payment preimage is invalid.
39+ InvalidPaymentPreimage ,
40+ /// The given payment secret is invalid.
41+ InvalidPaymentSecret ,
42+ /// The given amount is invalid.
43+ InvalidAmount ,
44+ /// The given invoice is invalid.
45+ InvalidInvoice ,
46+ /// The given channel ID is invalid.
47+ InvalidChannelId ,
48+ /// The given network is invalid.
49+ InvalidNetwork ,
50+ /// Payment of the given invoice has already been intiated.
51+ NonUniquePaymentHash ,
52+ /// There are insufficient funds to complete the given operation.
53+ InsufficientFunds ,
5454}
5555
5656impl fmt:: Display for Error {
@@ -62,28 +62,28 @@ impl fmt::Display for Error {
6262 write ! ( f, "On-chain transaction could not be created." )
6363 }
6464 Self :: ConnectionFailed => write ! ( f, "Network connection closed." ) ,
65- Self :: AddressInvalid => write ! ( f, "The given address is invalid." ) ,
66- Self :: PublicKeyInvalid => write ! ( f, "The given public key is invalid." ) ,
67- Self :: PaymentHashInvalid => write ! ( f, "The given payment hash is invalid." ) ,
68- Self :: PaymentPreimageInvalid => write ! ( f, "The given payment preimage is invalid." ) ,
69- Self :: PaymentSecretInvalid => write ! ( f, "The given payment secret is invalid." ) ,
70- Self :: NonUniquePaymentHash => write ! ( f, "An invoice must not get payed twice." ) ,
71- Self :: InvalidAmount => write ! ( f, "The given amount is invalid." ) ,
72- Self :: InvalidInvoice => write ! ( f, "The given invoice is invalid." ) ,
7365 Self :: InvoiceCreationFailed => write ! ( f, "Failed to create invoice." ) ,
74- Self :: InsufficientFunds => {
75- write ! ( f, "There are insufficient funds to complete the given operation." )
76- }
7766 Self :: PaymentFailed => write ! ( f, "Failed to send the given payment." ) ,
78- Self :: ChannelIdInvalid => write ! ( f, "The given channel ID is invalid." ) ,
79- Self :: NetworkInvalid => write ! ( f, "The given network is invalid." ) ,
8067 Self :: PeerInfoParseFailed => write ! ( f, "Failed to parse the given peer information." ) ,
8168 Self :: ChannelCreationFailed => write ! ( f, "Failed to create channel." ) ,
8269 Self :: ChannelClosingFailed => write ! ( f, "Failed to close channel." ) ,
8370 Self :: PersistenceFailed => write ! ( f, "Failed to persist data." ) ,
8471 Self :: WalletOperationFailed => write ! ( f, "Failed to conduct wallet operation." ) ,
8572 Self :: WalletSigningFailed => write ! ( f, "Failed to sign given transaction." ) ,
8673 Self :: TxSyncFailed => write ! ( f, "Failed to sync transactions." ) ,
74+ Self :: InvalidAddress => write ! ( f, "The given address is invalid." ) ,
75+ Self :: InvalidPublicKey => write ! ( f, "The given public key is invalid." ) ,
76+ Self :: InvalidPaymentHash => write ! ( f, "The given payment hash is invalid." ) ,
77+ Self :: InvalidPaymentPreimage => write ! ( f, "The given payment preimage is invalid." ) ,
78+ Self :: InvalidPaymentSecret => write ! ( f, "The given payment secret is invalid." ) ,
79+ Self :: InvalidAmount => write ! ( f, "The given amount is invalid." ) ,
80+ Self :: InvalidInvoice => write ! ( f, "The given invoice is invalid." ) ,
81+ Self :: InvalidChannelId => write ! ( f, "The given channel ID is invalid." ) ,
82+ Self :: InvalidNetwork => write ! ( f, "The given network is invalid." ) ,
83+ Self :: NonUniquePaymentHash => write ! ( f, "An invoice must not get payed twice." ) ,
84+ Self :: InsufficientFunds => {
85+ write ! ( f, "There are insufficient funds to complete the given operation." )
86+ }
8787 }
8888 }
8989}
0 commit comments