From 6dd4064b703780f2908486da3e864822ccf00df3 Mon Sep 17 00:00:00 2001 From: Roman Volosovskyi Date: Thu, 2 Aug 2018 10:08:20 +0300 Subject: [PATCH] remove nfc-react-native module --- android/app/build.gradle | 1 - .../im/status/ethereum/MainApplication.java | 2 -- android/settings.gradle | 2 -- clj-rn.conf.edn | 1 - mobile_files/package-lock.json | 10 ------- mobile_files/package.json | 1 - .../react_native/js_dependencies.cljs | 1 - src/status_im/ui/components/nfc.cljs | 26 ------------------- 8 files changed, 44 deletions(-) delete mode 100644 src/status_im/ui/components/nfc.cljs diff --git a/android/app/build.gradle b/android/app/build.gradle index 1ed5559dba..9cfc4c02f9 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -205,7 +205,6 @@ dependencies { implementation project(':react-native-svg') implementation 'com.android.support:multidex:1.0.2' implementation project(':react-native-http-bridge') - implementation project(':nfc-react-native') implementation project(':instabug-reactnative') implementation project(':react-native-splash-screen') implementation project(':react-native-image-resizer') diff --git a/android/app/src/main/java/im/status/ethereum/MainApplication.java b/android/app/src/main/java/im/status/ethereum/MainApplication.java index dc1ce7bbea..fc7a4c18db 100644 --- a/android/app/src/main/java/im/status/ethereum/MainApplication.java +++ b/android/app/src/main/java/im/status/ethereum/MainApplication.java @@ -19,7 +19,6 @@ import com.AlexanderZaytsev.RNI18n.RNI18nPackage; import com.lwansbrough.RCTCamera.RCTCameraPackage; import com.reactnative.ivpusic.imagepicker.PickerPackage; import com.rnfs.RNFSPackage; -import es.tiarg.nfcreactnative.NfcReactNativePackage; import fr.bamlab.rnimageresizer.ImageResizerPackage; import im.status.ethereum.module.StatusPackage; import io.realm.react.RealmReactPackage; @@ -61,7 +60,6 @@ public class MainApplication extends MultiDexApplication implements ReactApplica new SvgPackage(), new FIRMessagingPackage(), new HttpServerReactPackage(), - new NfcReactNativePackage(), new SplashScreenReactPackage(), statusPackage, new RealmReactPackage(), diff --git a/android/settings.gradle b/android/settings.gradle index cf38eb6be1..90863bfbc1 100644 --- a/android/settings.gradle +++ b/android/settings.gradle @@ -12,8 +12,6 @@ project(':react-native-fcm').projectDir = new File(rootProject.projectDir, '../n include ':app' include ':react-native-http-bridge' project(':react-native-http-bridge').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-http-bridge/android') -include ':nfc-react-native' -project(':nfc-react-native').projectDir = new File(rootProject.projectDir, '../node_modules/nfc-react-native/android') include ':instabug-reactnative' project(':instabug-reactnative').projectDir = new File(rootProject.projectDir, '../node_modules/instabug-reactnative/android') include ':react-native-splash-screen' diff --git a/clj-rn.conf.edn b/clj-rn.conf.edn index b6fe58ce15..1777db66d8 100644 --- a/clj-rn.conf.edn +++ b/clj-rn.conf.edn @@ -24,7 +24,6 @@ "web3" "chance" "instabug-reactnative" - "nfc-react-native" "react-native-http-bridge" "emojilib" "react-native-config" diff --git a/mobile_files/package-lock.json b/mobile_files/package-lock.json index 21ea15d080..e82247932e 100644 --- a/mobile_files/package-lock.json +++ b/mobile_files/package-lock.json @@ -5195,12 +5195,6 @@ "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=" }, - "nan": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.10.0.tgz", - "integrity": "sha512-bAdJv7fBLhWC+/Bls0Oza+mvTaNQtP+1RyhhhvD95pgUJz6XM5IzgmxOkItJ9tkoCiplvAnXI1tNmmUD/eScyA==", - "optional": true - }, "nanomatch": { "version": "1.2.13", "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", @@ -5258,9 +5252,6 @@ "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz", "integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk=" }, - "nfc-react-native": { - "version": "git+https://github.com/status-im/nfc-react-native.git#ecdb55e470bb9fa569d26fcc8af4e5169511a4d3" - }, "node-fetch": { "version": "1.7.3", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.3.tgz", @@ -6870,7 +6861,6 @@ "capture-exit": "1.2.0", "exec-sh": "0.2.2", "fb-watchman": "2.0.0", - "fsevents": "1.2.4", "micromatch": "3.1.10", "minimist": "1.2.0", "walker": "1.0.7", diff --git a/mobile_files/package.json b/mobile_files/package.json index b39d51ab98..c197a7d435 100644 --- a/mobile_files/package.json +++ b/mobile_files/package.json @@ -26,7 +26,6 @@ "identicon.js": "https://github.com/status-im/identicon.js.git", "instabug-reactnative": "2.12.0", "level-filesystem": "1.2.0", - "nfc-react-native": "https://github.com/status-im/nfc-react-native.git", "process": "0.11.10", "prop-types": "15.6.0", "punycode": "1.4.1", diff --git a/react-native/src/mobile/status_im/react_native/js_dependencies.cljs b/react-native/src/mobile/status_im/react_native/js_dependencies.cljs index 51642ab621..c37d1977d9 100644 --- a/react-native/src/mobile/status_im/react_native/js_dependencies.cljs +++ b/react-native/src/mobile/status_im/react_native/js_dependencies.cljs @@ -18,7 +18,6 @@ (def image-crop-picker (js/require "react-native-image-crop-picker")) (def image-resizer (js/require "react-native-image-resizer")) (def instabug (js/require "instabug-reactnative")) -(def nfc (js/require "nfc-react-native")) (def svg (js/require "react-native-svg")) (def react-native-fcm (js/require "react-native-fcm")) (def snoopy (js/require "rn-snoopy")) diff --git a/src/status_im/ui/components/nfc.cljs b/src/status_im/ui/components/nfc.cljs deleted file mode 100644 index 049bd60efc..0000000000 --- a/src/status_im/ui/components/nfc.cljs +++ /dev/null @@ -1,26 +0,0 @@ -(ns status-im.ui.components.nfc - (:require [status-im.utils.platform :as platform] - [status-im.react-native.js-dependencies :as js-dependencies])) - -(def android-only-error "NFC API is available only on Android") - -(defn get-card-id [on-success on-error] - (if platform/android? - (-> (.getCardId js-dependencies/nfc) - (.then on-success) - (.catch on-error)) - (on-error android-only-error))) - -(defn read-tag [sectors on-success on-error] - (if platform/android? - (-> (.readTag js-dependencies/nfc (clj->js sectors)) - (.then on-success) - (.catch on-error)) - (on-error android-only-error))) - -(defn write-tag [sectors card-id on-success on-error] - (if platform/android? - (-> (.writeTag js-dependencies/nfc (clj->js sectors) card-id) - (.then on-success) - (.catch on-error)) - (on-error android-only-error)))