Skip to content

Commit

Permalink
change in init and upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
dorin-iancu committed Nov 18, 2024
1 parent a2285e0 commit ebddd5a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions dex/router/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ use pair::config::ProxyTrait as _;
use pair::fee::ProxyTrait as _;
use pair::{read_pair_storage, ProxyTrait as _};
use pair_actions::create::{CreatePairArgs, PairTokens};
use state::{ACTIVE, INACTIVE};

const LP_TOKEN_DECIMALS: usize = 18;
const LP_TOKEN_INITIAL_SUPPLY: u64 = 1000;
Expand Down Expand Up @@ -44,7 +45,7 @@ pub trait Router:
{
#[init]
fn init(&self, pair_template_address_opt: OptionalValue<ManagedAddress>) {
self.state().set(true);
self.state().set(ACTIVE);
self.pair_creation_enabled().set(false);

self.temporary_owner_period()
Expand All @@ -59,7 +60,7 @@ pub trait Router:

#[upgrade]
fn upgrade(&self) {
self.state().set(false);
self.state().set(INACTIVE);
}

#[allow_multiple_var_args]
Expand Down

0 comments on commit ebddd5a

Please sign in to comment.