use msat_or_all for fundpsbt request amount

This commit is contained in:
joemphilips 2022-08-26 18:46:43 +09:00 committed by Christian Decker
parent d4ef20d54a
commit 836a2aa261
5 changed files with 100 additions and 100 deletions

View file

@ -988,7 +988,7 @@ message KeysendExtratlvs {
} }
message FundpsbtRequest { message FundpsbtRequest {
Amount satoshi = 1; AmountOrAll satoshi = 1;
Feerate feerate = 2; Feerate feerate = 2;
uint32 startweight = 3; uint32 startweight = 3;
optional uint32 minconf = 4; optional uint32 minconf = 4;

View file

@ -1355,7 +1355,7 @@ impl From<pb::KeysendRequest> for requests::KeysendRequest {
impl From<pb::FundpsbtRequest> for requests::FundpsbtRequest { impl From<pb::FundpsbtRequest> for requests::FundpsbtRequest {
fn from(c: pb::FundpsbtRequest) -> Self { fn from(c: pb::FundpsbtRequest) -> Self {
Self { Self {
satoshi: c.satoshi.unwrap().into(), // Rule #1 for type msat satoshi: c.satoshi.unwrap().into(), // Rule #1 for type msat_or_all
feerate: c.feerate.unwrap().into(), // Rule #1 for type feerate feerate: c.feerate.unwrap().into(), // Rule #1 for type feerate
startweight: c.startweight, // Rule #1 for type u32 startweight: c.startweight, // Rule #1 for type u32
minconf: c.minconf, // Rule #1 for type u32? minconf: c.minconf, // Rule #1 for type u32?

2
cln-rpc/src/model.rs generated
View file

@ -899,7 +899,7 @@ pub mod requests {
#[derive(Clone, Debug, Deserialize, Serialize)] #[derive(Clone, Debug, Deserialize, Serialize)]
pub struct FundpsbtRequest { pub struct FundpsbtRequest {
#[serde(alias = "satoshi")] #[serde(alias = "satoshi")]
pub satoshi: Amount, pub satoshi: AmountOrAll,
#[serde(alias = "feerate")] #[serde(alias = "feerate")]
pub feerate: Feerate, pub feerate: Feerate,
#[serde(alias = "startweight")] #[serde(alias = "startweight")]

File diff suppressed because one or more lines are too long

View file

@ -9,7 +9,7 @@
], ],
"properties": { "properties": {
"satoshi": { "satoshi": {
"type": "msat" "type": "msat_or_all"
}, },
"feerate": { "feerate": {
"type": "feerate" "type": "feerate"