Skip to content

Commit 432da4a

Browse files
authored
Merge pull request #905 from soramitsu/staging
staging
2 parents 7f6a87f + 76c8d97 commit 432da4a

File tree

694 files changed

+13522
-7128
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

694 files changed

+13522
-7128
lines changed

.editorconfig

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,7 @@ root = true
66
max_line_length = 160
77
insert_final_newline = true
88
indent_size = 4
9-
ktlint_disabled_rules = import-ordering,package-name
9+
ij_kotlin_packages_to_use_import_on_demand = unset
10+
ktlint_standard_import-ordering = disabled
11+
ktlint_standard_package-name = disabled
12+
ktlint_standard_indent = disabled

README.md

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,44 @@ Track features development: [board link](https://soramitsucoltd.aha.io/shared/34
1818

1919
To build Fearless Wallet Android project, you need to provide several keys either in enviroment variables or in `local.properties` file:
2020

21-
``` properties
21+
### Moonpay properties
22+
```
2223
MOONPAY_TEST_SECRET=stub
2324
MOONPAY_PRODUCTION_SECRET=stub
2425
```
25-
2626
Note, that with stub keys buy via moonpay will not work correctly. However, other parts of application will not be affected.
2727

28+
### Sora CARD SDK
29+
30+
For starting Sora CARD SDK initial data have to be provided via gradle properties due to security purpose.
31+
32+
````
33+
// PayWings repo credentials properties for getting artifacts
34+
PAY_WINGS_REPOSITORY_URL
35+
PAY_WINGS_USERNAME
36+
PAY_WINGS_PASSWORD
37+
38+
// Sora CARD API key
39+
SORA_CARD_API_KEY
40+
SORA_CARD_DOMAIN
41+
42+
// Sora CARD KYC credentials
43+
SORA_CARD_KYC_ENDPOINT_URL
44+
SORA_CARD_KYC_USERNAME
45+
SORA_CARD_KYC_PASSWORD
46+
````
47+
48+
### X1 plugin
49+
50+
X1 is a plugin which is embedded into webView. It requires url and id for launching.
51+
52+
````
53+
X1_ENDPOINT_URL_RELEASE
54+
X1_WIDGET_ID_RELEASE
55+
56+
X1_ENDPOINT_URL_DEBUG
57+
X1_WIDGET_ID_DEBUG
58+
````
59+
2860
## License
2961
Fearless Wallet Android is available under the Apache 2.0 license. See the LICENSE file for more info.

app/build.gradle

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ android {
3030
}
3131
buildTypes {
3232
debug {
33+
minifyEnabled minifyRelease
34+
proguardFiles 'proguard-rules.pro'
3335
applicationIdSuffix '.debug'
3436
versionNameSuffix '-debug'
3537
}
@@ -105,8 +107,8 @@ android {
105107
composeOptions {
106108
kotlinCompilerExtensionVersion composeCompilerVersion
107109
}
108-
lintOptions {
109-
disable "Instantiatable"
110+
lint {
111+
disable 'Instantiatable'
110112
}
111113
namespace 'jp.co.soramitsu.app'
112114
}
@@ -146,6 +148,9 @@ dependencies {
146148
implementation project(':feature-success-api')
147149
implementation project(':feature-success-impl')
148150

151+
implementation project(':feature-soracard-api')
152+
implementation project(':feature-soracard-impl')
153+
149154
implementation kotlinDep
150155

151156
implementation androidDep
@@ -158,8 +163,6 @@ dependencies {
158163

159164
implementation roomDep
160165

161-
implementation fearlessLibDep
162-
163166
implementation daggerDep
164167
kapt daggerKapt
165168

app/proguard-rules.pro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
## General
22
#-keep class ** { *; }
33
#-dontobfuscate
4-
-keep class jp.co.soramitsu.fearless_utils.** { *; }
4+
-keep class jp.co.soramitsu.shared_utils.** { *; }
55
-keep class jp.co.soramitsu.runtime.** { *; }
66

77
-keep class jp.co.soramitsu.wallet.impl.data.** { *; }

app/src/main/AndroidManifest.xml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,23 @@
99
<uses-permission android:name="android.permission.INTERNET" />
1010

1111
<application
12-
tools:replace="android:allowBackup"
1312
android:name="jp.co.soramitsu.app.App"
1413
android:allowBackup="false"
1514
android:icon="@mipmap/ic_launcher"
1615
android:label="@string/app_name"
1716
android:networkSecurityConfig="@xml/network_security_config"
18-
android:supportsRtl="true">
17+
android:supportsRtl="true"
18+
android:theme="@style/Theme.AppCompat.Light.NoActionBar"
19+
android:largeHeap="true"
20+
tools:replace="android:allowBackup">
1921

2022
<activity android:name="jp.co.soramitsu.common.qrScanner.QrScannerActivity" />
2123

2224
<activity
2325
android:name="jp.co.soramitsu.app.root.presentation.RootActivity"
2426
android:screenOrientation="portrait"
2527
android:theme="@style/Theme.Soramitsu.Fearless"
26-
android:launchMode="singleTask"
28+
android:launchMode="singleTop"
2729
android:windowSoftInputMode="adjustResize"
2830
android:exported="true">
2931
<intent-filter tools:ignore="AppLinkUrlError">
@@ -62,7 +64,8 @@
6264
android:exported="false">
6365
<meta-data
6466
android:name="android.support.FILE_PROVIDER_PATHS"
65-
android:resource="@xml/provider_paths" />
67+
android:resource="@xml/provider_paths"
68+
tools:replace="android:resource" />
6669
</provider>
6770

6871
</application>

app/src/main/java/jp/co/soramitsu/app/App.kt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import android.app.Application
44
import android.content.Context
55
import android.content.res.Configuration
66
import dagger.hilt.android.HiltAndroidApp
7+
import jp.co.soramitsu.common.data.network.OptionsProvider
78
import jp.co.soramitsu.common.resources.ContextManager
89
import jp.co.soramitsu.common.resources.LanguagesHolder
910

@@ -22,4 +23,13 @@ open class App : Application() {
2223
val contextManager = ContextManager.getInstanceOrInit(this, languagesHolder)
2324
contextManager.setLocale(this)
2425
}
26+
27+
override fun onCreate() {
28+
super.onCreate()
29+
30+
OptionsProvider.APPLICATION_ID = BuildConfig.APPLICATION_ID
31+
OptionsProvider.CURRENT_VERSION_CODE = BuildConfig.VERSION_CODE
32+
OptionsProvider.CURRENT_VERSION_NAME = BuildConfig.VERSION_NAME
33+
OptionsProvider.CURRENT_BUILD_TYPE = BuildConfig.BUILD_TYPE
34+
}
2535
}

app/src/main/java/jp/co/soramitsu/app/di/app/NavigationModule.kt

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,17 @@ import dagger.Module
44
import dagger.Provides
55
import dagger.hilt.InstallIn
66
import dagger.hilt.components.SingletonComponent
7-
import jp.co.soramitsu.app.root.navigation.Navigator
7+
import javax.inject.Singleton
88
import jp.co.soramitsu.account.impl.presentation.AccountRouter
9+
import jp.co.soramitsu.app.root.navigation.Navigator
910
import jp.co.soramitsu.crowdloan.impl.presentation.CrowdloanRouter
1011
import jp.co.soramitsu.onboarding.impl.OnboardingRouter
1112
import jp.co.soramitsu.polkaswap.api.presentation.PolkaswapRouter
12-
import jp.co.soramitsu.staking.impl.presentation.StakingRouter
13-
import jp.co.soramitsu.wallet.impl.presentation.WalletRouter
13+
import jp.co.soramitsu.soracard.api.presentation.SoraCardRouter
1414
import jp.co.soramitsu.splash.SplashRouter
15+
import jp.co.soramitsu.staking.impl.presentation.StakingRouter
1516
import jp.co.soramitsu.success.presentation.SuccessRouter
16-
import javax.inject.Singleton
17+
import jp.co.soramitsu.wallet.impl.presentation.WalletRouter
1718

1819
@InstallIn(SingletonComponent::class)
1920
@Module
@@ -54,4 +55,8 @@ class NavigationModule {
5455
@Singleton
5556
@Provides
5657
fun provideCrowdloanRouter(navigator: Navigator): CrowdloanRouter = navigator
58+
59+
@Singleton
60+
@Provides
61+
fun provideSoraCardRouter(navigator: Navigator): SoraCardRouter = navigator
5762
}

app/src/main/java/jp/co/soramitsu/app/root/domain/RootInteractor.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@ package jp.co.soramitsu.app.root.domain
22

33
import jp.co.soramitsu.common.data.storage.Preferences
44
import jp.co.soramitsu.common.domain.model.toDomain
5+
import jp.co.soramitsu.common.utils.inBackground
56
import jp.co.soramitsu.core.updater.UpdateSystem
67
import jp.co.soramitsu.core.updater.Updater
7-
import jp.co.soramitsu.wallet.impl.domain.interfaces.WalletRepository
88
import jp.co.soramitsu.wallet.impl.data.buyToken.ExternalProvider
9+
import jp.co.soramitsu.wallet.impl.domain.interfaces.WalletRepository
910
import kotlinx.coroutines.flow.Flow
1011
import kotlinx.coroutines.flow.flowOf
1112

@@ -15,7 +16,7 @@ class RootInteractor(
1516
private val preferences: Preferences
1617
) {
1718

18-
fun runBalancesUpdate(): Flow<Updater.SideEffect> = updateSystem.start()
19+
fun runBalancesUpdate(): Flow<Updater.SideEffect> = updateSystem.start().inBackground()
1920

2021
fun isBuyProviderRedirectLink(link: String) = ExternalProvider.REDIRECT_URL_BASE in link
2122

0 commit comments

Comments
 (0)