Skip to content

Commit

Permalink
fix modal integration
Browse files Browse the repository at this point in the history
  • Loading branch information
llbartekll committed Jun 14, 2024
1 parent 26c0110 commit c06c901
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions Example/DApp/Modules/Sign/SignPresenter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -205,10 +205,15 @@ extension SignPresenter {

Web3Modal.instance.SIWEAuthenticationPublisher
.receive(on: DispatchQueue.main)
.sink { [unowned self] _ in
AlertPresenter.present(message: "Authenticated with SIWE", type: .success)
self.router.dismiss()
self.getSession()
.sink { [unowned self] result in
switch result {
case .success((let message, let signature)):
AlertPresenter.present(message: "Authenticated with SIWE", type: .success)
self.router.dismiss()
self.getSession()
case .failure(let error):
AlertPresenter.present(message: "\(error)", type: .warning)
}
}
.store(in: &subscriptions)
}
Expand Down

0 comments on commit c06c901

Please sign in to comment.