Skip to content

Commit

Permalink
fixup! address suggested changes
Browse files Browse the repository at this point in the history
  • Loading branch information
phasewalk1 committed Mar 28, 2024
1 parent f5648d3 commit 265183b
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions crates/apps/src/lib/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4870,12 +4870,12 @@ pub mod args {
ctx: &mut Context,
) -> Result<UpdateStewardCommission<SdkTypes>, Self::Error> {
let tx = self.tx.to_sdk(ctx)?;
let _commission = std::fs::read(self.commission)?;
let commission = std::fs::read(self.commission)?;

Check warning on line 4873 in crates/apps/src/lib/cli.rs

View check run for this annotation

Codecov / codecov/patch

crates/apps/src/lib/cli.rs#L4871-L4873

Added lines #L4871 - L4873 were not covered by tests

Ok(UpdateStewardCommission::<SdkTypes> {
tx,

Check warning on line 4876 in crates/apps/src/lib/cli.rs

View check run for this annotation

Codecov / codecov/patch

crates/apps/src/lib/cli.rs#L4875-L4876

Added lines #L4875 - L4876 were not covered by tests
steward: ctx.borrow_chain_or_exit().get(&self.steward),
commission: _commission,
commission,

Check warning on line 4878 in crates/apps/src/lib/cli.rs

View check run for this annotation

Codecov / codecov/patch

crates/apps/src/lib/cli.rs#L4878

Added line #L4878 was not covered by tests
tx_code_path: self.tx_code_path.to_path_buf(),
})

Check warning on line 4880 in crates/apps/src/lib/cli.rs

View check run for this annotation

Codecov / codecov/patch

crates/apps/src/lib/cli.rs#L4880

Added line #L4880 was not covered by tests
}
Expand Down Expand Up @@ -5014,11 +5014,11 @@ pub mod args {
ctx: &mut Context,
) -> Result<InitProposal<SdkTypes>, Self::Error> {
let tx = self.tx.to_sdk(ctx)?;
let _proposal_data = std::fs::read(self.proposal_data)?;
let proposal_data = std::fs::read(self.proposal_data)?;

Check warning on line 5017 in crates/apps/src/lib/cli.rs

View check run for this annotation

Codecov / codecov/patch

crates/apps/src/lib/cli.rs#L5012-L5017

Added lines #L5012 - L5017 were not covered by tests

Ok(InitProposal::<SdkTypes> {
tx,
proposal_data: _proposal_data,
proposal_data,

Check warning on line 5021 in crates/apps/src/lib/cli.rs

View check run for this annotation

Codecov / codecov/patch

crates/apps/src/lib/cli.rs#L5019-L5021

Added lines #L5019 - L5021 were not covered by tests
is_offline: self.is_offline,
is_pgf_stewards: self.is_pgf_stewards,
is_pgf_funding: self.is_pgf_funding,
Expand Down Expand Up @@ -5108,17 +5108,18 @@ pub mod args {
ctx: &mut Context,
) -> Result<VoteProposal<SdkTypes>, Self::Error> {
let tx = self.tx.to_sdk(ctx)?;
let _proposal_data = self.proposal_data.map(|path| {
std::fs::read(path).expect("Should be able to read the file.")
});
let proposal_data = self
.proposal_data
.map(std::fs::read)
.transpose()?;

Check warning on line 5114 in crates/apps/src/lib/cli.rs

View check run for this annotation

Codecov / codecov/patch

crates/apps/src/lib/cli.rs#L5106-L5114

Added lines #L5106 - L5114 were not covered by tests

Ok(VoteProposal::<SdkTypes> {
tx,

Check warning on line 5117 in crates/apps/src/lib/cli.rs

View check run for this annotation

Codecov / codecov/patch

crates/apps/src/lib/cli.rs#L5116-L5117

Added lines #L5116 - L5117 were not covered by tests
proposal_id: self.proposal_id,
vote: self.vote,
voter: ctx.borrow_chain_or_exit().get(&self.voter),
is_offline: self.is_offline,
proposal_data: _proposal_data,
proposal_data,

Check warning on line 5122 in crates/apps/src/lib/cli.rs

View check run for this annotation

Codecov / codecov/patch

crates/apps/src/lib/cli.rs#L5122

Added line #L5122 was not covered by tests
tx_code_path: self.tx_code_path.to_path_buf(),
})

Check warning on line 5124 in crates/apps/src/lib/cli.rs

View check run for this annotation

Codecov / codecov/patch

crates/apps/src/lib/cli.rs#L5124

Added line #L5124 was not covered by tests
}
Expand Down Expand Up @@ -6567,9 +6568,8 @@ pub mod args {
),
)
})
.unwrap()
})
.collect(),
.collect::<Result<Vec<_>, _>>()?,

Check warning on line 6572 in crates/apps/src/lib/cli.rs

View check run for this annotation

Codecov / codecov/patch

crates/apps/src/lib/cli.rs#L6560-L6572

Added lines #L6560 - L6572 were not covered by tests
disposable_signing_key: self.disposable_signing_key,
tx_reveal_code_path: self.tx_reveal_code_path,
password: self.password,
Expand Down

0 comments on commit 265183b

Please sign in to comment.