Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
Artemka374 committed Aug 31, 2023
1 parent 5debf70 commit 283c08b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions contracts/src/upgradeability/proxy/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ pub trait ProxyImpl: Storage<Data> + Storage<ownable::Data> + Internal {
#[modifiers(ownable::only_owner)]
fn change_delegate_code(&mut self, new_code_hash: Hash) -> Result<(), OwnableError> {
let old_code_hash = self.data::<Data>().forward_to.get_or_default();
self.data::<Data>().forward_to.set(new_code_hash);
self.data::<Data>().forward_to.set(&new_code_hash);
self._emit_delegate_code_changed_event(Some(old_code_hash), Some(new_code_hash));
Ok(())
}
Expand All @@ -79,7 +79,7 @@ pub trait InternalImpl: Internal + Storage<Data> {
fn _emit_delegate_code_changed_event(&self, _previous: Option<Hash>, _new: Option<Hash>) {}

fn _init_with_forward_to(&mut self, forward_to: Hash) {
self.data().forward_to.set(forward_to);
self.data().forward_to.set(&forward_to);
Internal::_emit_delegate_code_changed_event(self, None, Some(forward_to));
}

Expand Down

0 comments on commit 283c08b

Please sign in to comment.