diff --git a/src/status_im/hardwallet/card.cljs b/src/status_im/hardwallet/card.cljs index e561efc879..8da7570370 100644 --- a/src/status_im/hardwallet/card.cljs +++ b/src/status_im/hardwallet/card.cljs @@ -3,13 +3,17 @@ [status-im.hardwallet.keycard :as keycard] [status-im.hardwallet.real-keycard :as real-keycard] [status-im.hardwallet.simulated-keycard :as simulated-keycard] + [status-im.hardwallet.ios-keycard :as ios-keycard] + [status-im.utils.platform :as platform] [taoensso.timbre :as log] [re-frame.core :as re-frame] [status-im.utils.config :as config])) (defonce card (if config/keycard-test-menu-enabled? (simulated-keycard/SimulatedKeycard.) - (real-keycard/RealKeycard.))) + (if platform/android? + (real-keycard/RealKeycard.) + (ios-keycard/IOSKeycard.)))) (defn check-nfc-support [] (log/info "[keycard] check-nfc-support") diff --git a/src/status_im/hardwallet/ios_keycard.cljs b/src/status_im/hardwallet/ios_keycard.cljs new file mode 100644 index 0000000000..3c3846ada3 --- /dev/null +++ b/src/status_im/hardwallet/ios_keycard.cljs @@ -0,0 +1,31 @@ +(ns status-im.hardwallet.ios-keycard + (:require [status-im.hardwallet.keycard :as keycard])) + +(defrecord IOSKeycard [] + keycard/Keycard + (check-nfc-support [this args]) + (check-nfc-enabled [this args]) + (open-nfc-settings [this]) + (register-card-events [this args]) + (on-card-disconnected [this callback]) + (on-card-connected [this callback]) + (remove-event-listener [this event]) + (remove-event-listeners [this]) + (get-application-info [this args]) + (install-applet [this args]) + (init-card [this args]) + (install-applet-and-init-card [this args]) + (pair [this args]) + (generate-mnemonic [this args]) + (generate-and-load-key [this args]) + (unblock-pin [this args]) + (verify-pin [this args]) + (change-pin [this args]) + (unpair [this args]) + (delete [this args]) + (remove-key [this args]) + (remove-key-with-unpair [this args]) + (export-key [this args]) + (unpair-and-delete [this args]) + (get-keys [this args]) + (sign [this args]))