Skip to content

Commit

Permalink
fix miss named var
Browse files Browse the repository at this point in the history
  • Loading branch information
deuszex authored Feb 8, 2024
1 parent a4c38e4 commit 1b1bf17
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cep18/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ pub fn upgrade(name: &str) {
.map(ContractPackageHash::new)
.unwrap_or_revert_with(Cep18Error::MissingPackageHashForUpgrade);

let previous_contract_version = runtime::get_key(&format!("{CONTRACT_NAME_PREFIX}{name}"))
let previous_contract_hash = runtime::get_key(&format!("{CONTRACT_NAME_PREFIX}{name}"))
.unwrap_or_revert()
.into_hash()
.map(ContractHash::new)
Expand All @@ -378,7 +378,7 @@ pub fn upgrade(name: &str) {
let (contract_hash, contract_version) =
storage::add_contract_version(contract_package_hash, entry_points, NamedKeys::new());

storage::disable_contract_version(contract_package_hash, previous_contract_version)
storage::disable_contract_version(contract_package_hash, previous_contract_hash)
.unwrap_or_revert();
runtime::put_key(
&format!("{CONTRACT_NAME_PREFIX}{name}"),
Expand Down

0 comments on commit 1b1bf17

Please sign in to comment.