(
self,
dfx_orbit: &DfxOrbit,
)
| 29 | |
| 30 | impl RequestAssetCommitArgs { |
| 31 | pub(super) async fn into_request( |
| 32 | self, |
| 33 | dfx_orbit: &DfxOrbit, |
| 34 | ) -> anyhow::Result<RequestOperationInput> { |
| 35 | let canister_id = dfx_orbit.canister_id(&self.canister)?; |
| 36 | let asset_agent = dfx_orbit.asset_agent(canister_id)?; |
| 37 | |
| 38 | let evidence = match self.evidence { |
| 39 | Some(evidence) => evidence, |
| 40 | None => { |
| 41 | let pathbufs = dfx_orbit.as_path_bufs(&self.canister, &self.files)?; |
| 42 | let paths = DfxOrbit::as_paths(&pathbufs); |
| 43 | asset_agent.compute_evidence(&paths).await? |
| 44 | } |
| 45 | }; |
| 46 | println!("Batch id: {}", self.batch_id); |
| 47 | println!("Evidence: {evidence}"); |
| 48 | |
| 49 | if self.dry_run { |
| 50 | bail!("Dry-run: aborting commit"); |
| 51 | } |
| 52 | |
| 53 | let evidence = hex::decode(evidence)?.into(); |
| 54 | DfxOrbit::commit_batch_input(canister_id, self.batch_id, evidence) |
| 55 | } |
| 56 | } |
nothing calls this directly
no test coverage detected