Skip to content

Commit

Permalink
replace execute_on_dest_context with sync_call_same_context
Browse files Browse the repository at this point in the history
  • Loading branch information
alyn509 committed May 14, 2024
1 parent d7d6c5b commit 4533a51
Showing 1 changed file with 8 additions and 13 deletions.
21 changes: 8 additions & 13 deletions nft-minter-deployer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,11 @@ pub trait NftMinterDeployer: factory::FactoryModule + events::EventsModule {
"NFT Minter contract does not exist"
);

let _: IgnoreValue = self
.tx()
self.tx()
.to(nft_minter_address)
.typed(nft_minter::nft_minter_proxy::NftMinterProxy)
.pause_endpoint()
.execute_on_dest_context();
.sync_call_same_context();
}

#[only_owner]
Expand All @@ -109,12 +108,11 @@ pub trait NftMinterDeployer: factory::FactoryModule + events::EventsModule {
"NFT Minter contract does not exist"
);

let _: IgnoreValue = self
.tx()
self.tx()
.to(nft_minter_address)
.typed(nft_minter::nft_minter_proxy::NftMinterProxy)
.unpause_endpoint()
.execute_on_dest_context();
.sync_call_same_context();
}

#[only_owner]
Expand All @@ -129,13 +127,11 @@ pub trait NftMinterDeployer: factory::FactoryModule + events::EventsModule {
.contains(&nft_minter_address),
"NFT Minter contract does not exist"
);

let _: IgnoreValue = self
.tx()
self.tx()
.to(nft_minter_address)
.typed(nft_minter::nft_minter_proxy::NftMinterProxy)
.add_user_to_admin_list(admin_address)
.execute_on_dest_context();
.sync_call_same_context();
}

#[only_owner]
Expand All @@ -151,12 +147,11 @@ pub trait NftMinterDeployer: factory::FactoryModule + events::EventsModule {
"NFT Minter contract does not exist"
);

let _: IgnoreValue = self
.tx()
self.tx()
.to(nft_minter_address)
.typed(nft_minter::nft_minter_proxy::NftMinterProxy)
.remove_user_from_admin_list(admin_address)
.execute_on_dest_context();
.sync_call_same_context();
}

#[only_owner]
Expand Down

0 comments on commit 4533a51

Please sign in to comment.