parent
f52b87ef22
commit
371c66aad1
|
@ -147,7 +147,6 @@ var TopLevel = {
|
|||
"getBlock" : function () {},
|
||||
"getBlockNumber" : function () {},
|
||||
"getConnectionInfo" : function () {},
|
||||
"getDeviceUUID" : function () {},
|
||||
"getDomain" : function () {},
|
||||
"getGasPrice" : function () {},
|
||||
"getGenericPassword" : function () {},
|
||||
|
|
|
@ -46,7 +46,6 @@ import java.text.SimpleDateFormat;
|
|||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Stack;
|
||||
import java.util.UUID;
|
||||
import java.util.zip.ZipEntry;
|
||||
import java.util.zip.ZipOutputStream;
|
||||
|
||||
|
@ -758,10 +757,6 @@ class StatusModule extends ReactContextBaseJavaModule implements LifecycleEventL
|
|||
StatusThreadPoolExecutor.getInstance().execute(r);
|
||||
}
|
||||
|
||||
private String createIdentifier() {
|
||||
return UUID.randomUUID().toString();
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
public void hashTransaction(final String txArgsJSON, final Callback callback) {
|
||||
Log.d(TAG, "hashTransaction");
|
||||
|
@ -1024,25 +1019,6 @@ class StatusModule extends ReactContextBaseJavaModule implements LifecycleEventL
|
|||
Statusgo.appStateChange(type);
|
||||
}
|
||||
|
||||
private static String uniqueID = null;
|
||||
private static final String PREF_UNIQUE_ID = "PREF_UNIQUE_ID";
|
||||
|
||||
@ReactMethod
|
||||
public void getDeviceUUID(final Callback callback) {
|
||||
if (uniqueID == null) {
|
||||
SharedPreferences sharedPrefs = this.getReactApplicationContext().getSharedPreferences(
|
||||
PREF_UNIQUE_ID, Context.MODE_PRIVATE);
|
||||
uniqueID = sharedPrefs.getString(PREF_UNIQUE_ID, null);
|
||||
if (uniqueID == null) {
|
||||
uniqueID = UUID.randomUUID().toString();
|
||||
SharedPreferences.Editor editor = sharedPrefs.edit();
|
||||
editor.putString(PREF_UNIQUE_ID, uniqueID);
|
||||
editor.commit();
|
||||
}
|
||||
}
|
||||
callback.invoke(uniqueID);
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
public void setBlankPreviewFlag(final Boolean blankPreview) {
|
||||
final SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(this.reactContext);
|
||||
|
|
|
@ -71,13 +71,6 @@ QVariantMap RCTStatus::constantsToExport() {
|
|||
return QVariantMap();
|
||||
}
|
||||
|
||||
void RCTStatus::getDeviceUUID(double callbackId) {
|
||||
Q_D(RCTStatus);
|
||||
qCDebug(RCTSTATUS) << "::getDeviceUUID call";
|
||||
|
||||
d->bridge->invokePromiseCallback(callbackId, QVariantList{"com.status.StatusIm"});
|
||||
}
|
||||
|
||||
QString RCTStatus::prepareDirAndUpdateConfig(QString configString) {
|
||||
Q_D(RCTStatus);
|
||||
qCDebug(RCTSTATUS) << "::prepareDirAndUpdateConfig call - configString:" << configString;
|
||||
|
|
|
@ -66,7 +66,6 @@ public:
|
|||
Q_INVOKABLE void callRPC(QString payload, double callbackId);
|
||||
Q_INVOKABLE void callPrivateRPC(QString payload, double callbackId);
|
||||
Q_INVOKABLE void closeApplication();
|
||||
Q_INVOKABLE void getDeviceUUID(double callbackId);
|
||||
|
||||
Q_INVOKABLE static bool JSCEnabled();
|
||||
Q_INVOKABLE static void statusGoEventCallback(const char* event);
|
||||
|
|
|
@ -632,15 +632,6 @@ RCT_EXPORT_METHOD(appStateChange:(NSString *)type) {
|
|||
StatusgoAppStateChange(type);
|
||||
}
|
||||
|
||||
RCT_EXPORT_METHOD(getDeviceUUID:(RCTResponseSenderBlock)callback) {
|
||||
#if DEBUG
|
||||
NSLog(@"getDeviceUUID() method called");
|
||||
#endif
|
||||
NSString* Identifier = [[[UIDevice currentDevice] identifierForVendor] UUIDString];
|
||||
|
||||
callback(@[Identifier]);
|
||||
}
|
||||
|
||||
RCT_EXPORT_METHOD(setBlankPreviewFlag:(BOOL *)newValue)
|
||||
{
|
||||
NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults];
|
||||
|
|
|
@ -75,11 +75,6 @@
|
|||
(fn [cofx _]
|
||||
(init/start-app cofx)))
|
||||
|
||||
(handlers/register-handler-fx
|
||||
:init.callback/get-device-UUID-success
|
||||
(fn [cofx [_ device-uuid]]
|
||||
(init/set-device-uuid cofx device-uuid)))
|
||||
|
||||
;; home screen
|
||||
|
||||
(handlers/register-handler-fx
|
||||
|
|
|
@ -23,21 +23,16 @@
|
|||
(fx/defn initialize-app-db
|
||||
"Initialize db to initial state"
|
||||
[{{:keys [view-id hardwallet initial-props desktop/desktop
|
||||
device-UUID supported-biometric-auth push-notifications/stored network/type]} :db}]
|
||||
supported-biometric-auth push-notifications/stored network/type]} :db}]
|
||||
{:db (assoc app-db
|
||||
:initial-props initial-props
|
||||
:desktop/desktop (merge desktop (:desktop/desktop app-db))
|
||||
:network/type type
|
||||
:hardwallet hardwallet
|
||||
:device-UUID device-UUID
|
||||
:supported-biometric-auth supported-biometric-auth
|
||||
:view-id view-id
|
||||
:push-notifications/stored stored)})
|
||||
|
||||
(fx/defn set-device-uuid
|
||||
[{:keys [db]} device-uuid]
|
||||
{:db (assoc db :device-UUID device-uuid)})
|
||||
|
||||
(fx/defn set-supported-biometric-auth
|
||||
{:events [:init.callback/get-supported-biometric-auth-success]}
|
||||
[{:keys [db]} supported-biometric-auth]
|
||||
|
@ -80,8 +75,7 @@
|
|||
|
||||
(fx/defn start-app [cofx]
|
||||
(fx/merge cofx
|
||||
{::get-device-UUID nil
|
||||
::get-supported-biometric-auth nil
|
||||
{::get-supported-biometric-auth nil
|
||||
::init-keystore nil
|
||||
::restore-native-settings nil
|
||||
::open-multiaccounts #(re-frame/dispatch [::initialize-multiaccounts %])
|
||||
|
@ -108,11 +102,6 @@
|
|||
(fn []
|
||||
(status/init-keystore)))
|
||||
|
||||
(re-frame/reg-fx
|
||||
::get-device-UUID
|
||||
(fn []
|
||||
(status/get-device-UUID #(re-frame/dispatch [:init.callback/get-device-UUID-success %]))))
|
||||
|
||||
(re-frame/reg-fx
|
||||
::get-supported-biometric-auth
|
||||
(fn []
|
||||
|
|
|
@ -206,12 +206,6 @@
|
|||
(defn app-state-change [state]
|
||||
(.appStateChange (status) state))
|
||||
|
||||
(defn get-device-UUID [callback]
|
||||
(.getDeviceUUID
|
||||
(status)
|
||||
(fn [UUID]
|
||||
(callback (string/upper-case UUID)))))
|
||||
|
||||
(defn set-blank-preview-flag [flag]
|
||||
(.setBlankPreviewFlag (status) flag))
|
||||
|
||||
|
|
|
@ -75,7 +75,6 @@
|
|||
(reg-root-key-sub :tab-bar-visible? :tab-bar-visible?)
|
||||
(reg-root-key-sub :dimensions/window :dimensions/window)
|
||||
(reg-root-key-sub :initial-props :initial-props)
|
||||
(reg-root-key-sub :get-device-UUID :device-UUID)
|
||||
(reg-root-key-sub :fleets/custom-fleets :custom-fleets)
|
||||
(reg-root-key-sub :chain-sync-state :node/chain-sync-state)
|
||||
(reg-root-key-sub :desktop/desktop :desktop/desktop)
|
||||
|
|
|
@ -155,10 +155,6 @@
|
|||
|
||||
(spec/def ::message-envelopes (spec/nilable map?))
|
||||
|
||||
;;;;UUID
|
||||
|
||||
(spec/def ::device-UUID (spec/nilable string?))
|
||||
|
||||
;;;; Supported Biometric authentication types
|
||||
|
||||
(spec/def ::supported-biometric-auth (spec/nilable #{:FaceID :TouchID :fingerprint}))
|
||||
|
@ -320,7 +316,6 @@
|
|||
:prices/prices
|
||||
:prices/prices-loading?
|
||||
:notifications/notifications
|
||||
::device-UUID
|
||||
::supported-biometric-auth
|
||||
::collectible
|
||||
::collectibles
|
||||
|
|
Loading…
Reference in New Issue