@@ -11,32 +11,10 @@ pub enum Error {
11
11
OnchainTxCreationFailed ,
12
12
/// A network connection has been closed.
13
13
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 ,
30
14
/// Invoice creation failed.
31
15
InvoiceCreationFailed ,
32
- /// There are insufficient funds to complete the given operation.
33
- InsufficientFunds ,
34
16
/// An attempted payment has failed.
35
17
PaymentFailed ,
36
- /// The given channel ID is invalid.
37
- ChannelIdInvalid ,
38
- /// The given network is invalid.
39
- NetworkInvalid ,
40
18
/// A given peer info could not be parsed.
41
19
PeerInfoParseFailed ,
42
20
/// A channel could not be opened.
@@ -51,6 +29,28 @@ pub enum Error {
51
29
WalletSigningFailed ,
52
30
/// A transaction sync operation failed.
53
31
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 ,
54
54
}
55
55
56
56
impl fmt:: Display for Error {
@@ -62,28 +62,28 @@ impl fmt::Display for Error {
62
62
write ! ( f, "On-chain transaction could not be created." )
63
63
}
64
64
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." ) ,
73
65
Self :: InvoiceCreationFailed => write ! ( f, "Failed to create invoice." ) ,
74
- Self :: InsufficientFunds => {
75
- write ! ( f, "There are insufficient funds to complete the given operation." )
76
- }
77
66
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." ) ,
80
67
Self :: PeerInfoParseFailed => write ! ( f, "Failed to parse the given peer information." ) ,
81
68
Self :: ChannelCreationFailed => write ! ( f, "Failed to create channel." ) ,
82
69
Self :: ChannelClosingFailed => write ! ( f, "Failed to close channel." ) ,
83
70
Self :: PersistenceFailed => write ! ( f, "Failed to persist data." ) ,
84
71
Self :: WalletOperationFailed => write ! ( f, "Failed to conduct wallet operation." ) ,
85
72
Self :: WalletSigningFailed => write ! ( f, "Failed to sign given transaction." ) ,
86
73
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
+ }
87
87
}
88
88
}
89
89
}
0 commit comments