Skip to content

Commit

Permalink
Run formatteR
Browse files Browse the repository at this point in the history
  • Loading branch information
bitzoic committed Nov 16, 2023
1 parent 1423e4d commit 941ad56
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions libs/ownership/src/ownable.sw
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,10 @@ pub fn _owner() -> State {
/// ```
#[storage(read)]
pub fn only_owner() {
require(_owner() == State::Initialized(msg_sender().unwrap()), AccessError::NotOwner);
require(
_owner() == State::Initialized(msg_sender().unwrap()),
AccessError::NotOwner,
);
}

/// Revokes ownership of the current owner and disallows any new owners.
Expand Down Expand Up @@ -123,7 +126,10 @@ pub fn renounce_ownership() {
/// ```
#[storage(read, write)]
pub fn initialize_ownership(new_owner: Identity) {
require(_owner() == State::Uninitialized, InitializationError::CannotReinitialized);
require(
_owner() == State::Uninitialized,
InitializationError::CannotReinitialized,
);

let owner_key = StorageKey::new(OWNER, 0, OWNER);
owner_key.write(State::Initialized(new_owner));
Expand Down

0 comments on commit 941ad56

Please sign in to comment.