Skip to content

Commit

Permalink
Merge pull request #3354 from safe-global/GH-3096/turn-off-add-owner
Browse files Browse the repository at this point in the history
GH-3096 remove the addOwner functionality from the flow
  • Loading branch information
DmitryBespalov authored Oct 6, 2023
2 parents 0997c58 + 2b3ddf0 commit 855d6dd
Showing 1 changed file with 1 addition and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,40 +72,8 @@ class GenerateKeyFlow: AddKeyFlow {
}

func addKeyAsOwner() {
guard let address = parameters?.address else {
assertionFailure("Missing key arguments")
return
}

safe = try? Safe.getSelected()
guard let safe = safe else {
didAddKeyAsOwner()
return
}

if safe.isReadOnly {
let vc = flowFactory.inviteToAddOwner { [unowned self] in
let vc = flowFactory.shareAddKeyAsOwnerLink(owner: address, safe: safe) { [unowned self] in
stop(success: true)
return
}

show(vc)
} onSkip: { [unowned self] in
didAddKeyAsOwner()
}
show(vc)

} else {
let addVC = flowFactory.addAsOwner { [unowned self] in
addOwner()
} replaced: { [unowned self] in
replaceOwner()
} skipped: { [unowned self] in
didAddKeyAsOwner()
}
show(addVC)
}
didAddKeyAsOwner()
}

func addOwner() {
Expand Down

0 comments on commit 855d6dd

Please sign in to comment.