Set log directory correctly

bb6139ae...b38b3817
This commit is contained in:
Andrea Maria Piana 2023-03-28 15:53:16 +01:00
parent 7ad5e2181d
commit f744d761c0
No known key found for this signature in database
GPG Key ID: AA6CCA6DE0E06424
7 changed files with 24 additions and 27 deletions

View File

@ -149,11 +149,15 @@ class StatusModule extends ReactContextBaseJavaModule implements LifecycleEventL
this.getReactApplicationContext().getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class).emit("gethEvent", params);
}
private File getLogsFile() {
private File getPublicStorageDirectory() {
final Context context = this.getReactApplicationContext();
// Environment.getExternalStoragePublicDirectory doesn't work as expected on Android Q
// https://developer.android.com/reference/android/os/Environment#getExternalStoragePublicDirectory(java.lang.String)
final File pubDirectory = context.getExternalFilesDir(Environment.DIRECTORY_DOWNLOADS);
return context.getExternalFilesDir(Environment.DIRECTORY_DOWNLOADS);
}
private File getLogsFile() {
final File pubDirectory = this.getPublicStorageDirectory();
final File logFile = new File(pubDirectory, gethLogFileName);
return logFile;
@ -1170,8 +1174,8 @@ class StatusModule extends ReactContextBaseJavaModule implements LifecycleEventL
@ReactMethod(isBlockingSynchronousMethod = true)
public String logFilePath() {
return getLogsFile().getAbsolutePath();
public String logFileDirectory() {
return getPublicStorageDirectory().getAbsolutePath();
}
@ReactMethod(isBlockingSynchronousMethod = true)

View File

@ -882,7 +882,7 @@ RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(backupDisabledDataDir) {
return rootUrl.path;
}
RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(logFilePath) {
RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(logFileDirectory) {
NSFileManager *fileManager = [NSFileManager defaultManager];
NSURL *rootUrl =[[fileManager
URLsForDirectory:NSLibraryDirectory inDomains:NSUserDomainMask]

View File

@ -628,6 +628,6 @@
[]
(.keystoreDir ^js (status)))
(defn log-file-path
(defn log-file-directory
[]
(.logFilePath ^js (status)))
(.logFileDirectory ^js (status)))

View File

@ -138,6 +138,12 @@
:url "#"
:icons ["https://statusnetwork.com/img/press-kit-status-logo.svg"]})
(def default-network-id
(get-in default-networks-by-id [default-network :config :NetworkId]))
(def default-network-rpc-url
(get-in default-networks-by-id [default-network :config :UpstreamConfig :URL]))
(def wallet-connect-project-id "87815d72a81d739d2a7ce15c2cfdefb3")
(def delete-message-undo-time-limit-ms 4000)

View File

@ -93,12 +93,15 @@
:wakuV2Nameserver "1.1.1.1"
:logLevel (when log-enabled? config/log-level)
:logEnabled log-enabled?
:logFilePath (status/log-file-path)
:logFilePath (status/log-file-directory)
:openseaAPIKey config/opensea-api-key
:verifyTransactionURL config/verify-transaction-url
:verifyENSURL config/verify-ens-url
:verifyENSContractAddress config/verify-ens-contract-address
:verifyTransactionChainID config/verify-transaction-chain-id
:upstreamConfig config/default-network-rpc-url
:networkId config/default-network-id
:currentNetwork config/default-network
:previewPrivacy config/blank-preview?}]
{effect request
:dispatch [:navigate-to :generating-keys]

View File

@ -3,7 +3,6 @@
[quo2.core :as quo]
[react-native.core :as rn]
[status-im.keycard.recovery :as keycard]
[status-im.multiaccounts.recover.core :as multiaccounts.recover]
[status-im2.common.resources :as resources]
[status-im2.contexts.onboarding.new-to-status.style :as style]
[status-im2.contexts.onboarding.common.navigation-bar.view :as navigation-bar]
@ -40,21 +39,6 @@
(i18n/label :t/experienced-web3)]]
[rn/view {:style style/suboptions}
[quo/small-option-card
{:variant :icon
:title "Temporary (old) generate keys flow"
:subtitle "generate keys"
:image (resources/get-image :use-keycard)
:accessibility-label :generate-old-key
:on-press #(rf/dispatch [:generate-and-derive-addresses])}]
[rn/view {:style style/space-between-suboptions}]
[quo/small-option-card
{:variant :icon
:title "Temporary (old) recover phrase flow"
:subtitle (i18n/label :t/use-recovery-phrase-subtitle)
:image (resources/get-image :ethereum-address)
:on-press #(rf/dispatch [::multiaccounts.recover/enter-phrase-pressed])}]
[rn/view {:style style/space-between-suboptions}]
[quo/small-option-card
{:variant :icon
:title (i18n/label :t/use-recovery-phrase)

View File

@ -3,7 +3,7 @@
"_comment": "Instead use: scripts/update-status-go.sh <rev>",
"owner": "status-im",
"repo": "status-go",
"version": "v0.142.1",
"commit-sha1": "bb6139aef1718ef89861d0ed372952473178b881",
"src-sha256": "07n9gx7n8wxdxznk0g3kcy77pn14k42j1ixf18bfqgf5z40ixyna"
"version": "v0.142.3",
"commit-sha1": "b38b381778088bf44c8cafecc1e61958226123d0",
"src-sha256": "003c4d0jiv2wqx9dnjzqycads4grq3yics30mbl84lsy1r56jn75"
}