Files
wallet/apps/mobile/ios/Lux/Onboarding/Import/SeedPhraseInputManager.swift
zeekay 55a7f247ca init: extract wallet from lux/exchange monorepo
Copies apps/extension, apps/mobile and 10 pkgs (wallet, ui, config,
utilities, sessions, gating, notifications, analytics, eslint-config,
prices) into a standalone pnpm workspace.  Resolves merge conflict
markers in extension and mobile package.json files, strips build
artifacts (.wxt, .output, Pods).
2026-04-11 01:59:19 -07:00

49 lines
1.2 KiB
Swift

//
// SeedPhraseInputManager.swift
// Lux
//
// Created by Gary Ye on 9/15/23.
//
// Using a view manager written in Swift instead of bridging headers
// because couldn't get RCT_EXTERN_METHOD to work with that approach
@objc(SeedPhraseInputManager)
class SeedPhraseInputManager: RCTViewManager {
override func view() -> UIView! {
return SeedPhraseInputView()
}
// Required by RN to initialize on main thread
override class func requiresMainQueueSetup() -> Bool {
true
}
@objc func focus(_ node: NSNumber) -> Void {
DispatchQueue.main.async {
let component = self.bridge.uiManager.view(forReactTag: node) as? SeedPhraseInputView
component?.focus()
}
}
@objc func blur(_ node: NSNumber) -> Void {
DispatchQueue.main.async {
let component = self.bridge.uiManager.view(forReactTag: node) as? SeedPhraseInputView
component?.blur()
}
}
@objc func handleSubmit(_ node: NSNumber) -> Void {
DispatchQueue.main.async {
let component = self.bridge.uiManager.view(
forReactTag: node
) as? SeedPhraseInputView
component?.handleSubmit()
// TODO garydebug add error logging for view not found
}
}
}