Disable keycard on ios

This commit is contained in:
Roman Volosovskyi 2020-04-03 11:41:40 +03:00
parent 71ab9c9d9d
commit 151b6a3cbf
No known key found for this signature in database
GPG Key ID: 0238A4B5ECEE70DE
2 changed files with 36 additions and 1 deletions

View File

@ -3,13 +3,17 @@
[status-im.hardwallet.keycard :as keycard] [status-im.hardwallet.keycard :as keycard]
[status-im.hardwallet.real-keycard :as real-keycard] [status-im.hardwallet.real-keycard :as real-keycard]
[status-im.hardwallet.simulated-keycard :as simulated-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] [taoensso.timbre :as log]
[re-frame.core :as re-frame] [re-frame.core :as re-frame]
[status-im.utils.config :as config])) [status-im.utils.config :as config]))
(defonce card (if config/keycard-test-menu-enabled? (defonce card (if config/keycard-test-menu-enabled?
(simulated-keycard/SimulatedKeycard.) (simulated-keycard/SimulatedKeycard.)
(real-keycard/RealKeycard.))) (if platform/android?
(real-keycard/RealKeycard.)
(ios-keycard/IOSKeycard.))))
(defn check-nfc-support [] (defn check-nfc-support []
(log/info "[keycard] check-nfc-support") (log/info "[keycard] check-nfc-support")

View File

@ -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]))