Skip to content
This repository has been archived by the owner on Aug 28, 2023. It is now read-only.

Commit

Permalink
Remove viewing key (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
Steven-Chang committed Apr 13, 2022
1 parent 8046039 commit c05d927
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 25 deletions.
Binary file added sn-dex-aggregator-2.wasm.gz
Binary file not shown.
Binary file removed sn-dex-aggregator.wasm.gz
Binary file not shown.
1 change: 0 additions & 1 deletion src/constants.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
pub const BLOCK_SIZE: usize = 256;
pub const CONFIG_KEY: &[u8] = b"config";
pub static KEY_ROUTE_STATE: &[u8] = b"route_state";
pub const VIEWING_KEY: &str = "DoTheRightThing.";
25 changes: 1 addition & 24 deletions src/contract.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::authorize::authorize;
use crate::constants::{BLOCK_SIZE, CONFIG_KEY, VIEWING_KEY};
use crate::constants::{BLOCK_SIZE, CONFIG_KEY};
use crate::{
msg::{HandleMsg, InitMsg, QueryMsg, Snip20Swap},
state::{
Expand Down Expand Up @@ -370,13 +370,6 @@ fn register_tokens(env: &Env, tokens: Vec<SecretContract>) -> StdResult<HandleRe
contract_hash.clone(),
address.clone(),
)?);
messages.push(snip20::set_viewing_key_msg(
VIEWING_KEY.into(),
None,
BLOCK_SIZE,
contract_hash,
address,
)?);
}

Ok(HandleResponse {
Expand Down Expand Up @@ -1218,14 +1211,6 @@ mod tests {
mock_buttcoin().address,
)
.unwrap(),
snip20::set_viewing_key_msg(
VIEWING_KEY.into(),
None,
BLOCK_SIZE,
mock_buttcoin().contract_hash,
mock_buttcoin().address,
)
.unwrap(),
snip20::register_receive_msg(
mock_contract().contract_hash,
None,
Expand All @@ -1234,14 +1219,6 @@ mod tests {
mock_token().address,
)
.unwrap(),
snip20::set_viewing_key_msg(
VIEWING_KEY.into(),
None,
BLOCK_SIZE,
mock_token().contract_hash,
mock_token().address,
)
.unwrap()
]
);
}
Expand Down

0 comments on commit c05d927

Please sign in to comment.