Skip to content

Commit

Permalink
Fix project
Browse files Browse the repository at this point in the history
  • Loading branch information
ant013 committed Nov 8, 2023
1 parent c39c80d commit 18a5c13
Showing 1 changed file with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,24 +18,22 @@ extension AddressAppShowModule: IEventHandler {
return
}

var uri: String?
var address: String?
switch event {
case let event as String:
uri = event
address = event
default: ()
}

guard let uri else {
guard let address else {
throw EventHandler.HandleError.noSuitableHandler
}

let uriParser = AddressParserFactory.parser(blockchainType: <#T##BlockchainType?##MarketKit.BlockchainType?#>)

let disposeBag = DisposeBag()
let chain = AddressParserFactory.parserChain(blockchainType: nil, withEns: false)
let types = try await withCheckedThrowingContinuation { continuation in
chain
.handlers(address: uri)
.handlers(address: address)
.subscribe(onSuccess: { items in
continuation.resume(returning: items.map { $0.blockchainType })
}, onError: { error in
Expand All @@ -48,7 +46,7 @@ extension AddressAppShowModule: IEventHandler {
throw EventHandler.HandleError.noSuitableHandler
}

guard let viewController = WalletModule.sendTokenListViewController(allowedBlockchainTypes: types, prefilledAddress: uri) else {
guard let viewController = WalletModule.sendTokenListViewController(allowedBlockchainTypes: types, prefilledAddress: address) else {
return
}

Expand Down

0 comments on commit 18a5c13

Please sign in to comment.