Skip to content

Commit

Permalink
extra checks
Browse files Browse the repository at this point in the history
  • Loading branch information
psorinionut committed Apr 1, 2024
1 parent c792082 commit d720e83
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions locked-asset/proxy_dex/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ pub trait ProxyDexImpl:

#[endpoint]
fn upgrade(&self, old_locked_token_id: TokenIdentifier, old_factory_address: ManagedAddress) {
require!(
old_locked_token_id.is_valid_esdt_identifier(),
"Invalid token id"
);
self.require_sc_address(&old_factory_address);

self.old_locked_token_id()
.set_if_empty(&old_locked_token_id);
self.old_factory_address()
Expand Down

0 comments on commit d720e83

Please sign in to comment.