Skip to content

Commit

Permalink
clear the data on init to make sure secret isn't returned
Browse files Browse the repository at this point in the history
It doesn't currently actually return the migration secret in the data 
but it technically should, and will after this issue is fixed: scrtlabs/SecretNetwork#1323 (comment)
  • Loading branch information
luca992 committed Feb 8, 2023
1 parent 4953145 commit 641f119
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions contracts/purchaseable-snip721-v1/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,10 @@ pub(crate) fn init_snip721(
let snip721_response = snip721_reference_impl::contract::instantiate(deps, env, info.clone(), instantiate_msg)
.unwrap();

// clear the data (that contains the secret) which would be set when init_snip721 is called
// clear the data (that contains the secret) which would be set before init_snip721 is called
// from reply as part of the migration process
// https://github.com/CosmWasm/cosmwasm/blob/main/SEMANTICS.md#handling-the-reply
return Ok(snip721_response);
return Ok(snip721_response.set_data(b""));
}


Expand Down

0 comments on commit 641f119

Please sign in to comment.