Skip to content

Commit

Permalink
fix the parameter order for the "is_writer" function call. (#778)
Browse files Browse the repository at this point in the history
  • Loading branch information
derrick-yang authored Aug 16, 2023
1 parent a7a46fa commit d7c16f9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/dojo-core/src/world.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ mod world {
/// * `system` - The name of the system.
fn revoke_writer(ref self: ContractState, component: felt252, system: felt252) {
assert(
IWorld::is_writer(@self, caller_system(@self), component)
IWorld::is_writer(@self, component, caller_system(@self))
|| IWorld::is_owner(@self, get_caller_address(), component)
|| IWorld::is_owner(@self, get_caller_address(), 0),
'not owner'
Expand Down Expand Up @@ -516,7 +516,7 @@ mod world {
);

assert(
IWorld::is_writer(self, caller_system(self), component)
IWorld::is_writer(self, component, caller_system(self))
|| IWorld::is_owner(self, get_tx_info().unbox().account_contract_address, component)
|| IWorld::is_owner(self, get_tx_info().unbox().account_contract_address, 0),
'not writer'
Expand Down

0 comments on commit d7c16f9

Please sign in to comment.