Skip to content

Commit

Permalink
Change to function
Browse files Browse the repository at this point in the history
  • Loading branch information
klkvr committed Dec 8, 2023
1 parent 5f1f348 commit f2a5268
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions crates/forge/bin/cmd/script/multi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,9 @@ pub struct SensitiveMultiChainSequence {
pub deployments: Vec<SensitiveScriptSequence>,
}

impl From<&mut MultiChainSequence> for SensitiveMultiChainSequence {
fn from(sequence: &mut MultiChainSequence) -> Self {
SensitiveMultiChainSequence {
deployments: sequence.deployments.iter_mut().map(|sequence| sequence.into()).collect(),
}
fn to_sensitive(sequence: &mut MultiChainSequence) -> SensitiveMultiChainSequence {
SensitiveMultiChainSequence {
deployments: sequence.deployments.iter_mut().map(|sequence| sequence.into()).collect(),
}
}

Expand Down Expand Up @@ -140,7 +138,7 @@ impl MultiChainSequence {
pub fn save(&mut self) -> Result<()> {
self.timestamp = now().as_secs();

let sensitive_sequence: SensitiveMultiChainSequence = self.into();
let sensitive_sequence: SensitiveMultiChainSequence = to_sensitive(self);

// broadcast writes
//../Contract-latest/run.json
Expand Down

0 comments on commit f2a5268

Please sign in to comment.