mirror of
https://github.com/status-im/status-mobile.git
synced 2025-02-02 20:05:09 +00:00
[#15944] Set installation name on account creation
This commit is contained in:
parent
3058ebe018
commit
b953ddb5af
@ -1156,23 +1156,7 @@ RCT_EXPORT_METHOD(deactivateKeepAwake)
|
|||||||
|
|
||||||
- (NSString*) deviceName
|
- (NSString*) deviceName
|
||||||
{
|
{
|
||||||
|
return [[UIDevice currentDevice] name];;
|
||||||
NSString* deviceName = nil;
|
|
||||||
|
|
||||||
if ([self.deviceId rangeOfString:@"iPod"].location != NSNotFound) {
|
|
||||||
deviceName = @"iPod Touch";
|
|
||||||
}
|
|
||||||
else if([self.deviceId rangeOfString:@"iPad"].location != NSNotFound) {
|
|
||||||
deviceName = @"iPad";
|
|
||||||
}
|
|
||||||
else if([self.deviceId rangeOfString:@"iPhone"].location != NSNotFound){
|
|
||||||
deviceName = @"iPhone";
|
|
||||||
}
|
|
||||||
else if([self.deviceId rangeOfString:@"AppleTV"].location != NSNotFound){
|
|
||||||
deviceName = @"Apple TV";
|
|
||||||
}
|
|
||||||
|
|
||||||
return deviceName;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSDictionary *)constantsToExport
|
- (NSDictionary *)constantsToExport
|
||||||
|
@ -4,7 +4,8 @@
|
|||||||
[taoensso.timbre :as log]
|
[taoensso.timbre :as log]
|
||||||
[react-native.platform :as platform]
|
[react-native.platform :as platform]
|
||||||
[react-native.core :as rn]
|
[react-native.core :as rn]
|
||||||
[utils.transforms :as types]))
|
[utils.transforms :as types]
|
||||||
|
[clojure.string :as string]))
|
||||||
|
|
||||||
(defn status
|
(defn status
|
||||||
[]
|
[]
|
||||||
@ -387,6 +388,14 @@
|
|||||||
:build-id (.-buildId status)
|
:build-id (.-buildId status)
|
||||||
:device-id (.-deviceId status)}))
|
:device-id (.-deviceId status)}))
|
||||||
|
|
||||||
|
(defn get-installation-name
|
||||||
|
[]
|
||||||
|
;; NOTE(rasom): Only needed for android devices currently
|
||||||
|
(when platform/android?
|
||||||
|
(string/join " "
|
||||||
|
((juxt :model :device-id)
|
||||||
|
(get-device-model-info)))))
|
||||||
|
|
||||||
(defn get-node-config
|
(defn get-node-config
|
||||||
[callback]
|
[callback]
|
||||||
(log/debug "[native-module] get-node-config")
|
(log/debug "[native-module] get-node-config")
|
||||||
|
@ -80,6 +80,7 @@
|
|||||||
:multiaccount/restore-account-and-login
|
:multiaccount/restore-account-and-login
|
||||||
:multiaccount/create-account-and-login)
|
:multiaccount/create-account-and-login)
|
||||||
request {:displayName display-name
|
request {:displayName display-name
|
||||||
|
:deviceName (native-module/get-installation-name)
|
||||||
:password (ethereum/sha3 (security/safe-unmask-data
|
:password (ethereum/sha3 (security/safe-unmask-data
|
||||||
password))
|
password))
|
||||||
:mnemonic (when seed-phrase
|
:mnemonic (when seed-phrase
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
(let [db {:networks/current-network config/default-network
|
(let [db {:networks/current-network config/default-network
|
||||||
:networks/networks (data-store.settings/rpc->networks config/default-networks)
|
:networks/networks (data-store.settings/rpc->networks config/default-networks)
|
||||||
:profile/profile {:installation-id installation-id
|
:profile/profile {:installation-id installation-id
|
||||||
|
:device-name (native-module/get-installation-name)
|
||||||
:log-level config/log-level
|
:log-level config/log-level
|
||||||
:waku-bloom-filter-mode false
|
:waku-bloom-filter-mode false
|
||||||
:custom-bootnodes nil
|
:custom-bootnodes nil
|
||||||
@ -59,7 +60,9 @@
|
|||||||
{:receiverConfig {:kdfIterations config/default-kdf-iterations
|
{:receiverConfig {:kdfIterations config/default-kdf-iterations
|
||||||
:nodeConfig final-node-config
|
:nodeConfig final-node-config
|
||||||
:settingCurrentNetwork config/default-network
|
:settingCurrentNetwork config/default-network
|
||||||
:deviceType utils.platform/os}}))]
|
:deviceType utils.platform/os
|
||||||
|
:deviceName
|
||||||
|
(native-module/get-installation-name)}}))]
|
||||||
(rf/dispatch [:syncing/update-role constants/local-pairing-role-receiver])
|
(rf/dispatch [:syncing/update-role constants/local-pairing-role-receiver])
|
||||||
(native-module/input-connection-string-for-bootstrapping
|
(native-module/input-connection-string-for-bootstrapping
|
||||||
connection-string
|
connection-string
|
||||||
|
Loading…
x
Reference in New Issue
Block a user