-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
44 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 26 additions & 1 deletion
27
fearless/Modules/ClaimCrowdloanRewards/ClaimCrowdloanRewardsRouter.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,28 @@ | ||
import Foundation | ||
import SSFModels | ||
import SoraUI | ||
|
||
final class ClaimCrowdloanRewardsRouter: ClaimCrowdloanRewardsRouterInput {} | ||
final class ClaimCrowdloanRewardsRouter: ClaimCrowdloanRewardsRouterInput { | ||
func complete( | ||
on view: ControllerBackedProtocol?, | ||
title: String, | ||
chainAsset: ChainAsset | ||
) { | ||
let presenter = view?.controller.presentingViewController | ||
|
||
let controller = AllDoneAssembly.configureModule(chainAsset: chainAsset, hashString: title)?.view.controller | ||
controller?.modalPresentationStyle = .custom | ||
|
||
let factory = ModalSheetBlurPresentationFactory( | ||
configuration: ModalSheetPresentationConfiguration.fearlessBlur | ||
) | ||
controller?.modalTransitioningFactory = factory | ||
|
||
view?.controller.dismiss(animated: true) { | ||
if let presenter = presenter as? ControllerBackedProtocol, | ||
let controller = controller { | ||
presenter.controller.present(controller, animated: true) | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters