mirror of
https://github.com/pezkuwichain/pezkuwi-wallet-android.git
synced 2026-11-20 01:26:11 +00:00
Log Wallet Connect init failures; give empty errors a text; retranslate Kurmanji (#33)
* Log Wallet Connect init failures; give empty network errors a text - Wallet Connect core and Web3Wallet initialization errors were swallowed silently; log them. A retry is not added: initialization fails only on bad configuration, and the relay connects later on demand. - NovaException.networkError carried an empty message; it now uses the existing translated connection error text. The unused NovaException.unexpectedError is removed. - BaseException.unexpectedError fell back to an empty message when the exception had none; HttpExceptionHandler now passes the translated common error text as the fallback. - Remove the unused AccountRepository.getMyAccounts stub. * Retranslate the Kurmanji strings The values-ku file was word-by-word machine output that mixed English and Kurmanji (1709 of 2080 strings had English left in, 620 were English verbatim). Rebuild it from the English source with a fixed wallet glossary: every translatable string and plural is translated, 18 strings that were missing are added, and strings marked translatable="false" or no longer in the English source are dropped. * Skip commented-out strings in the Kurmanji file Two English strings have an older, commented-out copy; reading the comments emitted each of them twice and failed resource merging.
This commit is contained in:
1 parent
de826acc70
commit
58ef588261
8 files changed
+1954
-2628
No files matched your search
@@ -3,6 +3,7 @@ package io.novafoundation.nova.app
|
||||
import android.app.Application
|
||||
import android.content.Context
|
||||
import android.content.res.Configuration
|
||||
import android.util.Log
|
||||
import com.walletconnect.android.Core
|
||||
import com.walletconnect.android.CoreClient
|
||||
import com.walletconnect.android.relay.ConnectionType
|
||||
@@ -14,6 +15,7 @@ import io.novafoundation.nova.common.di.CommonApi
|
||||
import io.novafoundation.nova.common.di.FeatureContainer
|
||||
import io.novafoundation.nova.common.resources.ContextManager
|
||||
import io.novafoundation.nova.common.resources.LanguagesHolder
|
||||
import io.novafoundation.nova.common.utils.LOG_TAG
|
||||
import io.novafoundation.nova.common.utils.coroutines.RootScope
|
||||
import io.novafoundation.nova.feature_wallet_connect_impl.BuildConfig
|
||||
import javax.inject.Inject
|
||||
@@ -85,13 +87,15 @@ open class App : Application(), FeatureContainer {
|
||||
)
|
||||
|
||||
CoreClient.initialize(relayServerUrl = serverUrl, connectionType = connectionType, application = this, metaData = appMetaData) { error ->
|
||||
// TODO maybe re-initialize client
|
||||
// Initialization fails only on bad configuration (project id, metadata), which a retry would not fix.
|
||||
// The relay itself connects later, on demand, in RealWalletConnectService
|
||||
Log.e(LOG_TAG, "Failed to initialize Wallet Connect core", error.throwable)
|
||||
}
|
||||
|
||||
val initParams = Wallet.Params.Init(core = CoreClient)
|
||||
|
||||
Web3Wallet.initialize(initParams) { error ->
|
||||
// TODO maybe re-initialize client
|
||||
Log.e(LOG_TAG, "Failed to initialize Web3Wallet", error.throwable)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user