Skip to content

Commit

Permalink
Merge pull request #1675 from novasamatech/rc/8.7.0
Browse files Browse the repository at this point in the history
Rc/8.7.0
  • Loading branch information
antonijzelinskij authored Oct 8, 2024
2 parents ffd909c + efd94b6 commit 2b36519
Show file tree
Hide file tree
Showing 260 changed files with 6,729 additions and 924 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/android_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@ env:
CI_DEVELOP_GOOGLE_SERVICES_FILE: ${{ secrets.CI_DEVELOP_GOOGLE_SERVICES }}
CI_PRODUCTION_GOOGLE_SERVICES_FILE: ${{ secrets.CI_PRODUCTION_GOOGLE_SERVICES }}

POLKASSEMBLY_SUMMARY_API_KEY: ${{ secrets.POLKASSEMBLY_SUMMARY_API_KEY }}

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{inputs.upload-name}}
cancel-in-progress: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/balances_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ jobs:
with:
to: ${{ secrets.TELEGRAM_TO }}
token: ${{ secrets.TELEGRAM_TOKEN }}
format: markdown
format: html
message: |
💸 Balances tests failed.
Expand Down
59 changes: 59 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,65 @@ Next gen application for Polkadot & Kusama ecosystem, transparent & community-or
Nova Wallet aims to provide as many Polkadot ecosystem features as possible in a form of mobile app, unbiased to any network & without any restrictions/limits to the users.
Developed by the former Fearless Wallet team & based on open-source work under Apache 2.0 license.

### Build instructions

#### Clone repo

```
git clone git@github.com:novasamatech/nova-wallet-android.git
```

#### Install NDK

Instal NDK version `26.1.10909125` from SDK Manager by going to Tools -> SDK Mmanager -> Sdk Tools -> NDK (Side by Side)

#### Instal Rust

Install Rust by following [official instruction](https://www.rust-lang.org/tools/install). Use "Using rustup" option. On MacOS you can also install rust with [brew](https://formulae.brew.sh/formula/rust)

Run the following commands to add Android build targets to rustup:

```
rustup target add armv7-linux-androideabi
rustup target add i686-linux-android
rustup target add x86_64-linux-android
rustup target add aarch64-linux-android
```

#### Update local.properties

Add the following lines to your local.properties

```
ACALA_PROD_AUTH_TOKEN=mock
ACALA_TEST_AUTH_TOKEN=mock
CI_KEYSTORE_KEY_ALIAS=mock
CI_KEYSTORE_KEY_PASS=mock
CI_KEYSTORE_PASS=mock
DEBUG_GOOGLE_OAUTH_ID=mock
RELEASE_GOOGLE_OAUTH_ID=mock
DWELLIR_API_KEY=mock
EHTERSCAN_API_KEY_ETHEREUM=mock
EHTERSCAN_API_KEY_MOONBEAM=mock
EHTERSCAN_API_KEY_MOONRIVER=mock
INFURA_API_KEY=mock
MERCURYO_PRODUCTION_SECRET=mock
MERCURYO_TEST_SECRET=mock
MOONBEAM_PROD_AUTH_TOKEN=mock
MOONBEAM_TEST_AUTH_TOKEN=mock
MOONPAY_PRODUCTION_SECRET=mock
MOONPAY_TEST_SECRET=mock
WALLET_CONNECT_PROJECT_ID=mock
```
Note, that Firebase and Google related features (Notifications, Cloud Backups) wont work properly with this setup.

If you face `Secret X is not found` error, it means that README is not up-to-date. Add `X=mock` line to local.properties as well

#### Setup build type

In Nova Wallet, `debug` build type use fixed key, not publickly shared keystore to fix fingerprint to make Google-related features work
To use your local debug keystore switch to `debugLocal` build type.

## License
Nova Wallet Android is available under the Apache 2.0 license. See the LICENSE file for more info.
© Novasama Technologies GmbH 2023
9 changes: 8 additions & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ android {
keyAlias readRawSecretOrNull('CI_KEYSTORE_KEY_ALIAS')
keyPassword readRawSecretOrNull('CI_KEYSTORE_KEY_PASS')
}
debug {
debugFixedKey {
storeFile file('develop_key.jks')
storePassword readRawSecretOrNull('CI_KEYSTORE_PASS')
keyAlias readRawSecretOrNull('CI_KEYSTORE_KEY_ALIAS')
Expand All @@ -46,11 +46,18 @@ android {
}
buildTypes {
debug {
signingConfig signingConfigs.debugFixedKey

applicationIdSuffix '.debug'
versionNameSuffix '-debug'

buildConfigField "String", "BuildType", "\"debug\""
}
debugLocal {
initWith buildTypes.debug
matchingFallbacks = ['debug']
signingConfig signingConfigs.debug
}
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ import io.novafoundation.nova.app.root.navigation.NavigationHolder
import io.novafoundation.nova.app.root.navigation.Navigator
import io.novafoundation.nova.app.root.navigation.governance.GovernanceNavigator
import io.novafoundation.nova.app.root.navigation.governance.SelectTracksCommunicatorImpl
import io.novafoundation.nova.app.root.navigation.governance.TinderGovVoteCommunicatorImpl
import io.novafoundation.nova.common.di.scope.ApplicationScope
import io.novafoundation.nova.feature_account_api.presenatation.account.wallet.list.SelectTracksCommunicator
import io.novafoundation.nova.feature_governance_impl.presentation.GovernanceRouter
import io.novafoundation.nova.feature_governance_impl.presentation.referenda.vote.setup.tindergov.TinderGovVoteCommunicator

@Module
class GovernanceNavigationModule {
Expand All @@ -26,4 +28,11 @@ class GovernanceNavigationModule {
router: GovernanceRouter,
navigationHolder: NavigationHolder
): SelectTracksCommunicator = SelectTracksCommunicatorImpl(router, navigationHolder)

@Provides
@ApplicationScope
fun provideTinderGovVoteCommunicator(
router: GovernanceRouter,
navigationHolder: NavigationHolder
): TinderGovVoteCommunicator = TinderGovVoteCommunicatorImpl(router, navigationHolder)
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,14 @@ import io.novafoundation.nova.feature_governance_impl.presentation.delegation.de
import io.novafoundation.nova.feature_governance_impl.presentation.delegation.delegation.revoke.confirm.RevokeDelegationConfirmPayload
import io.novafoundation.nova.feature_governance_impl.presentation.referenda.details.ReferendumDetailsFragment
import io.novafoundation.nova.feature_governance_api.presentation.referenda.details.ReferendumDetailsPayload
import io.novafoundation.nova.feature_governance_impl.presentation.common.info.ReferendumInfoFragment
import io.novafoundation.nova.feature_governance_impl.presentation.common.info.ReferendumInfoPayload
import io.novafoundation.nova.feature_governance_impl.presentation.referenda.full.ReferendumFullDetailsFragment
import io.novafoundation.nova.feature_governance_impl.presentation.referenda.full.ReferendumFullDetailsPayload
import io.novafoundation.nova.feature_governance_impl.presentation.referenda.vote.confirm.ConfirmReferendumVoteFragment
import io.novafoundation.nova.feature_governance_impl.presentation.referenda.vote.confirm.ConfirmVoteReferendumPayload
import io.novafoundation.nova.feature_governance_impl.presentation.referenda.vote.setup.SetupVoteReferendumFragment
import io.novafoundation.nova.feature_governance_impl.presentation.referenda.vote.setup.SetupVoteReferendumPayload
import io.novafoundation.nova.feature_governance_impl.presentation.referenda.vote.setup.common.SetupVoteFragment
import io.novafoundation.nova.feature_governance_impl.presentation.referenda.vote.setup.common.SetupVotePayload
import io.novafoundation.nova.feature_governance_impl.presentation.referenda.voters.ReferendumVotersFragment
import io.novafoundation.nova.feature_governance_impl.presentation.referenda.voters.ReferendumVotersPayload

Expand Down Expand Up @@ -65,9 +67,14 @@ class GovernanceNavigator(
args = ReferendumVotersFragment.getBundle(payload)
)

override fun openSetupVoteReferendum(payload: SetupVoteReferendumPayload) = performNavigation(
override fun openSetupReferendumVote(payload: SetupVotePayload) = performNavigation(
actionId = R.id.action_referendumDetailsFragment_to_setupVoteReferendumFragment,
args = SetupVoteReferendumFragment.getBundle(payload)
args = SetupVoteFragment.getBundle(payload)
)

override fun openSetupTinderGovVote(payload: SetupVotePayload) = performNavigation(
actionId = R.id.action_tinderGovCards_to_setupTinderGovVoteFragment,
args = SetupVoteFragment.getBundle(payload)
)

override fun backToReferendumDetails() = performNavigation(R.id.action_confirmReferendumVote_to_referendumDetailsFragment)
Expand Down Expand Up @@ -122,6 +129,30 @@ class GovernanceNavigator(
performNavigation(R.id.action_open_select_governance_tracks, args = bundle)
}

override fun openTinderGovCards() {
performNavigation(R.id.action_openTinderGovCards)
}

override fun openTinderGovBasket() {
performNavigation(R.id.action_tinderGovCards_to_tinderGovBasket)
}

override fun openConfirmTinderGovVote() {
performNavigation(R.id.action_setupTinderGovBasket_to_confirmTinderGovVote)
}

override fun backToTinderGovCards() = performNavigation(
actionId = R.id.action_confirmTinderGovVote_to_tinderGovCards
)

override fun openReferendumInfo(payload: ReferendumInfoPayload) = performNavigation(
cases = arrayOf(
R.id.tinderGovCards to R.id.action_tinderGovCards_to_referendumInfo,
R.id.setupTinderGovBasketFragment to R.id.action_setupTinderGovBasket_to_referendumInfo
),
args = ReferendumInfoFragment.getBundle(payload)
)

override fun openReferendaSearch() {
performNavigation(R.id.action_open_referenda_search)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package io.novafoundation.nova.app.root.navigation.governance

import io.novafoundation.nova.app.root.navigation.NavStackInterScreenCommunicator
import io.novafoundation.nova.app.root.navigation.NavigationHolder
import io.novafoundation.nova.common.sequrity.verification.PinCodeTwoFactorVerificationResponder.Response
import io.novafoundation.nova.feature_governance_impl.presentation.GovernanceRouter
import io.novafoundation.nova.feature_governance_impl.presentation.referenda.vote.setup.common.SetupVotePayload
import io.novafoundation.nova.feature_governance_impl.presentation.referenda.vote.setup.tindergov.TinderGovVoteCommunicator
import io.novafoundation.nova.feature_governance_impl.presentation.referenda.vote.setup.tindergov.TinderGovVoteRequester
import io.novafoundation.nova.feature_governance_impl.presentation.referenda.vote.setup.tindergov.TinderGovVoteResponder
import kotlinx.coroutines.flow.Flow

class TinderGovVoteCommunicatorImpl(private val router: GovernanceRouter, navigationHolder: NavigationHolder) :
NavStackInterScreenCommunicator<TinderGovVoteRequester.Request, TinderGovVoteResponder.Response>(navigationHolder),
TinderGovVoteCommunicator {

override val responseFlow: Flow<TinderGovVoteResponder.Response>
get() = clearedResponseFlow()

override fun openRequest(request: TinderGovVoteRequester.Request) {
super.openRequest(request)

router.openSetupTinderGovVote(SetupVotePayload(request.referendumId))
}
}
10 changes: 10 additions & 0 deletions app/src/main/res/navigation/main_nav_graph.xml
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,14 @@
app:popEnterAnim="@anim/fragment_close_enter"
app:popExitAnim="@anim/fragment_close_exit" />

<action
android:id="@+id/action_openTinderGovCards"
app:destination="@id/tinder_gov_graph"
app:enterAnim="@anim/fragment_open_enter"
app:exitAnim="@anim/fragment_open_exit"
app:popEnterAnim="@anim/fragment_close_enter"
app:popExitAnim="@anim/fragment_close_exit" />

<fragment
android:id="@+id/mainFragment"
android:name="io.novafoundation.nova.app.root.presentation.main.MainFragment"
Expand Down Expand Up @@ -994,4 +1002,6 @@

<include app:graph="@navigation/network_management_graph" />

<include app:graph="@navigation/tinder_gov_graph" />

</navigation>
2 changes: 1 addition & 1 deletion app/src/main/res/navigation/referendum_details_graph.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@

<fragment
android:id="@+id/setupVoteReferendumFragment"
android:name="io.novafoundation.nova.feature_governance_impl.presentation.referenda.vote.setup.SetupVoteReferendumFragment"
android:name="io.novafoundation.nova.feature_governance_impl.presentation.referenda.vote.setup.referenda.SetupReferendumVoteFragment"
android:label="SetupVoteReferendumFragment">

<action
Expand Down
96 changes: 96 additions & 0 deletions app/src/main/res/navigation/tinder_gov_graph.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
<?xml version="1.0" encoding="utf-8"?>
<navigation xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/tinder_gov_graph"
app:startDestination="@id/tinderGovCards">

<fragment
android:id="@+id/tinderGovCards"
android:name="io.novafoundation.nova.feature_governance_impl.presentation.tindergov.cards.TinderGovCardsFragment"
android:label="TinderGovCardsFragment"
tools:layout="@layout/fragment_tinder_gov_cards">

<action
android:id="@+id/action_tinderGovCards_to_setupTinderGovVoteFragment"
app:destination="@id/setupTinderGovVoteFragment"
app:enterAnim="@anim/fragment_open_enter"
app:exitAnim="@anim/fragment_open_exit"
app:popEnterAnim="@anim/fragment_close_enter"
app:popExitAnim="@anim/fragment_close_exit" />

<action
android:id="@+id/action_tinderGovCards_to_tinderGovBasket"
app:destination="@id/setupTinderGovBasketFragment"
app:enterAnim="@anim/fragment_open_enter"
app:exitAnim="@anim/fragment_open_exit"
app:popEnterAnim="@anim/fragment_close_enter"
app:popExitAnim="@anim/fragment_close_exit" />

<action
android:id="@+id/action_tinderGovCards_to_referendumInfo"
app:destination="@id/referendumInfoFragment"
app:enterAnim="@anim/fragment_close_enter"
app:exitAnim="@anim/fragment_close_exit"
app:popEnterAnim="@anim/fragment_open_enter"
app:popExitAnim="@anim/fragment_open_exit" />

</fragment>

<fragment
android:id="@+id/setupTinderGovVoteFragment"
android:name="io.novafoundation.nova.feature_governance_impl.presentation.referenda.vote.setup.tindergov.SetupTinderGovVoteFragment"
android:label="SetupTinderGovVoteFragment"
app:useAdd="true"
tools:layout="@layout/fragment_setup_vote" />

<fragment
android:id="@+id/setupTinderGovBasketFragment"
android:name="io.novafoundation.nova.feature_governance_impl.presentation.tindergov.basket.TinderGovBasketFragment"
android:label="TinderGovBasketFragment"
app:useAdd="true"
tools:layout="@layout/fragment_tinder_gov_basket">

<action
android:id="@+id/action_setupTinderGovBasket_to_confirmTinderGovVote"
app:destination="@id/confirmTinderGovVoteFragment"
app:enterAnim="@anim/fragment_open_enter"
app:exitAnim="@anim/fragment_open_exit"
app:popEnterAnim="@anim/fragment_close_enter"
app:popExitAnim="@anim/fragment_close_exit" />

<action
android:id="@+id/action_setupTinderGovBasket_to_referendumInfo"
app:destination="@id/referendumInfoFragment"
app:enterAnim="@anim/fragment_close_enter"
app:exitAnim="@anim/fragment_close_exit"
app:popEnterAnim="@anim/fragment_open_enter"
app:popExitAnim="@anim/fragment_open_exit" />

</fragment>

<fragment
android:id="@+id/confirmTinderGovVoteFragment"
android:name="io.novafoundation.nova.feature_governance_impl.presentation.tindergov.confirm.ConfirmTinderGovVoteFragment"
android:label="ConfirmTinderGovVoteFragment"
app:useAdd="true">

<action
android:id="@+id/action_confirmTinderGovVote_to_tinderGovCards"
app:destination="@id/tinderGovCards"
app:enterAnim="@anim/fragment_close_enter"
app:exitAnim="@anim/fragment_close_exit"
app:popEnterAnim="@anim/fragment_open_enter"
app:popExitAnim="@anim/fragment_open_exit"
app:popUpTo="@id/tinderGovCards"
app:popUpToInclusive="true" />

</fragment>

<fragment
android:id="@+id/referendumInfoFragment"
android:name="io.novafoundation.nova.feature_governance_impl.presentation.common.info.ReferendumInfoFragment"
android:label="ConfirmTinderGovVoteFragment"
app:useAdd="true" />

</navigation>
10 changes: 7 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
buildscript {
ext {
// App version
versionName = '8.6.0'
versionCode = 154
versionName = '8.7.0'
versionCode = 155

applicationId = "io.novafoundation.nova"
releaseApplicationSuffix = "market"
Expand Down Expand Up @@ -51,7 +51,7 @@ buildscript {

web3jVersion = '4.9.5'

substrateSdkVersion = '2.1.2'
substrateSdkVersion = '2.1.4'

gifVersion = '1.2.19'

Expand Down Expand Up @@ -92,6 +92,8 @@ buildscript {
googleApiClientVersion = "1.32.1"
googleDriveVersion = "v3-rev20210919-1.32.1"

cardStackVersion = "2.3.4"

withoutTransitiveAndroidX = {
exclude group: "androidx.appcompat", module: "appcompat"
exclude group: "androidx.fragment", module: "fragment-ktx"
Expand Down Expand Up @@ -213,6 +215,8 @@ buildscript {
firebaseAppCheck = "com.google.firebase:firebase-appcheck-playintegrity"

kotlinReflect = "org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion"

cardStackView = "com.github.yuyakaido:cardstackview:$cardStackVersion"
}

repositories {
Expand Down
Loading

0 comments on commit 2b36519

Please sign in to comment.