mirror of
https://github.com/luxfi/wallet.git
synced 2026-10-30 15:13:19 +00:00
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).
49 lines
1.2 KiB
Swift
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
|
|
}
|
|
}
|
|
}
|