Skip to content

Commit

Permalink
fix identity verification for the whitelisted_postfix related interfa…
Browse files Browse the repository at this point in the history
…ces.
  • Loading branch information
MagicGordon committed Oct 8, 2024
1 parent 9d853b0 commit 88f385f
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ref-exchange/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ref-exchange"
version = "1.9.6"
version = "1.9.7"
authors = ["Illia Polosukhin <[email protected]>"]
edition = "2018"
publish = false
Expand Down
6 changes: 6 additions & 0 deletions ref-exchange/release_notes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Release Notes

### Version 1.9.7
```
Cc7rca9tb9CZKQRkm5fqXMErVuCcGr3aeoxNsUgmkVhX
```
1. fix identity verification for the whitelisted_postfix related interfaces.

### Version 1.9.6
```
2Yo8qJ5S3biFJbnBdb4ZNcGhN1RhHJq34cGF4g7Yigcw
Expand Down
4 changes: 2 additions & 2 deletions ref-exchange/src/owner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ impl Contract {
#[payable]
pub fn extend_auto_whitelisted_postfix(&mut self, postfixes: Vec<String>) {
assert_one_yocto();
self.is_owner_or_guardians();
assert!(self.is_owner_or_guardians(), "{}", ERR100_NOT_ALLOWED);
for postfix in postfixes {
self.auto_whitelisted_postfix.insert(postfix.clone());
}
Expand All @@ -84,7 +84,7 @@ impl Contract {
#[payable]
pub fn remove_auto_whitelisted_postfix(&mut self, postfixes: Vec<String>) {
assert_one_yocto();
self.is_owner_or_guardians();
assert!(self.is_owner_or_guardians(), "{}", ERR100_NOT_ALLOWED);
for postfix in postfixes {
let exist = self.auto_whitelisted_postfix.remove(&postfix);
assert!(exist, "{}", ERR105_WHITELISTED_POSTFIX_NOT_IN_LIST);
Expand Down
2 changes: 1 addition & 1 deletion ref-exchange/tests/test_migrate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ fn test_upgrade() {
.assert_success();
let metadata = get_metadata(&pool);
// println!("{:#?}", metadata);
assert_eq!(metadata.version, "1.9.6".to_string());
assert_eq!(metadata.version, "1.9.7".to_string());
assert_eq!(metadata.admin_fee_bps, 5);
assert_eq!(metadata.boost_farm_id, "boost_farm".to_string());
assert_eq!(metadata.burrowland_id, "burrowland".to_string());
Expand Down
Binary file modified releases/ref_exchange_release.wasm
Binary file not shown.
Binary file added releases/ref_exchange_release_v196.wasm
Binary file not shown.

0 comments on commit 88f385f

Please sign in to comment.