mirror of
https://github.com/aljazceru/lightning.git
synced 2026-02-23 15:04:19 +01:00
cln-grpc: Map AmountOrAll and AmountOrAny
This commit is contained in:
committed by
Rusty Russell
parent
04e7e285d7
commit
bba68e2136
@@ -75,7 +75,7 @@ impl ClnRpc {
|
||||
// serde_json knows which variant of [`Request`] should be
|
||||
// used.
|
||||
response["method"] = req2["method"].clone();
|
||||
|
||||
log::warn!("XXX {:?}", response);
|
||||
serde_json::from_value(response).context("converting response into enum")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -321,7 +321,7 @@ pub mod requests {
|
||||
#[derive(Clone, Debug, Deserialize, Serialize)]
|
||||
pub struct InvoiceRequest {
|
||||
#[serde(alias = "msatoshi")]
|
||||
pub msatoshi: Amount,
|
||||
pub msatoshi: AmountOrAny,
|
||||
#[serde(alias = "description")]
|
||||
pub description: String,
|
||||
#[serde(alias = "label")]
|
||||
@@ -477,7 +477,7 @@ pub mod requests {
|
||||
#[serde(alias = "destination")]
|
||||
pub destination: String,
|
||||
#[serde(alias = "satoshi", skip_serializing_if = "Option::is_none")]
|
||||
pub satoshi: Option<Amount>,
|
||||
pub satoshi: Option<AmountOrAll>,
|
||||
#[serde(alias = "feerate", skip_serializing_if = "Option::is_none")]
|
||||
pub feerate: Option<Feerate>,
|
||||
#[serde(alias = "minconf", skip_serializing_if = "Option::is_none")]
|
||||
|
||||
Reference in New Issue
Block a user