Skip to content

Commit

Permalink
Merge pull request #1719 from novasamatech/rc/9.0.0
Browse files Browse the repository at this point in the history
Rc/9.0.0
  • Loading branch information
antonijzelinskij authored Nov 12, 2024
2 parents 83cef1c + 67ff9c6 commit f82b380
Show file tree
Hide file tree
Showing 305 changed files with 7,039 additions and 1,728 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import dagger.Provides
import io.novafoundation.nova.app.root.navigation.NavigationHolder
import io.novafoundation.nova.app.root.navigation.Navigator
import io.novafoundation.nova.app.root.navigation.settings.SettingsNavigator
import io.novafoundation.nova.app.root.presentation.RootRouter
import io.novafoundation.nova.common.di.scope.ApplicationScope
import io.novafoundation.nova.feature_settings_impl.SettingsRouter
import io.novafoundation.nova.feature_wallet_connect_impl.WalletConnectRouter
Expand All @@ -15,8 +16,9 @@ class SettingsNavigationModule {
@ApplicationScope
@Provides
fun provideRouter(
rootRouter: RootRouter,
navigationHolder: NavigationHolder,
walletConnectRouter: WalletConnectRouter,
navigator: Navigator,
): SettingsRouter = SettingsNavigator(navigationHolder, walletConnectRouter, navigator)
): SettingsRouter = SettingsNavigator(navigationHolder, rootRouter, walletConnectRouter, navigator)
}
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,18 @@ import io.novafoundation.nova.feature_account_impl.presentation.startCreateWalle
import io.novafoundation.nova.feature_account_impl.presentation.watchOnly.change.ChangeWatchAccountFragment
import io.novafoundation.nova.feature_assets.presentation.AssetsRouter
import io.novafoundation.nova.feature_assets.presentation.balance.detail.BalanceDetailFragment
import io.novafoundation.nova.feature_assets.presentation.flow.network.NetworkFlowFragment
import io.novafoundation.nova.feature_assets.presentation.flow.network.NetworkFlowPayload
import io.novafoundation.nova.feature_assets.presentation.model.OperationParcelizeModel
import io.novafoundation.nova.feature_assets.presentation.receive.ReceiveFragment
import io.novafoundation.nova.feature_assets.presentation.send.TransferDraft
import io.novafoundation.nova.feature_assets.presentation.send.amount.SelectSendFragment
import io.novafoundation.nova.feature_assets.presentation.send.amount.SendPayload
import io.novafoundation.nova.feature_assets.presentation.send.confirm.ConfirmSendFragment
import io.novafoundation.nova.feature_assets.presentation.swap.AssetSwapFlowFragment
import io.novafoundation.nova.feature_assets.presentation.swap.SwapFlowPayload
import io.novafoundation.nova.feature_assets.presentation.swap.asset.AssetSwapFlowFragment
import io.novafoundation.nova.feature_assets.presentation.swap.asset.SwapFlowPayload
import io.novafoundation.nova.feature_assets.presentation.swap.network.NetworkSwapFlowFragment
import io.novafoundation.nova.feature_assets.presentation.swap.network.NetworkSwapFlowPayload
import io.novafoundation.nova.feature_assets.presentation.tokens.add.enterInfo.AddTokenEnterInfoFragment
import io.novafoundation.nova.feature_assets.presentation.tokens.add.enterInfo.AddTokenEnterInfoPayload
import io.novafoundation.nova.feature_assets.presentation.tokens.manage.chain.ManageChainTokensFragment
Expand Down Expand Up @@ -323,10 +327,6 @@ class Navigator(
navController?.navigate(R.id.action_open_receive, ReceiveFragment.getBundle(assetPayload))
}

override fun openAssetFilters() {
navController?.navigate(R.id.action_mainFragment_to_assetFiltersFragment)
}

override fun openAssetSearch() {
navController?.navigate(R.id.action_mainFragment_to_assetSearchFragment)
}
Expand Down Expand Up @@ -387,6 +387,26 @@ class Navigator(
navController?.navigate(R.id.action_close_send_flow)
}

override fun openSendNetworks(payload: NetworkFlowPayload) {
navController?.navigate(R.id.action_sendFlow_to_sendFlowNetwork, NetworkFlowFragment.createPayload(payload))
}

override fun openReceiveNetworks(payload: NetworkFlowPayload) {
navController?.navigate(R.id.action_receiveFlow_to_receiveFlowNetwork, NetworkFlowFragment.createPayload(payload))
}

override fun openSwapNetworks(payload: NetworkSwapFlowPayload) {
navController?.navigate(R.id.action_selectAssetSwapFlowFragment_to_swapFlowNetworkFragment, NetworkSwapFlowFragment.createPayload(payload))
}

override fun openBuyNetworks(payload: NetworkFlowPayload) {
navController?.navigate(R.id.action_buyFlow_to_buyFlowNetwork, NetworkFlowFragment.createPayload(payload))
}

override fun returnToMainSwapScreen() {
navController?.navigate(R.id.action_return_to_swap_settings)
}

override fun openSwapFlow() {
val payload = SwapFlowPayload.InitialSelecting
navController?.navigate(R.id.action_mainFragment_to_swapFlow, AssetSwapFlowFragment.getBundle(payload))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import io.novafoundation.nova.app.R
import io.novafoundation.nova.app.root.navigation.BaseNavigator
import io.novafoundation.nova.app.root.navigation.NavigationHolder
import io.novafoundation.nova.app.root.navigation.Navigator
import io.novafoundation.nova.app.root.presentation.RootRouter
import io.novafoundation.nova.feature_account_impl.presentation.pincode.PinCodeAction
import io.novafoundation.nova.feature_account_impl.presentation.pincode.PincodeFragment
import io.novafoundation.nova.feature_settings_impl.SettingsRouter
Expand All @@ -19,11 +20,16 @@ import io.novafoundation.nova.feature_wallet_connect_impl.presentation.sessions.

class SettingsNavigator(
navigationHolder: NavigationHolder,
private val rootRouter: RootRouter,
private val walletConnectDelegate: WalletConnectRouter,
private val delegate: Navigator
) : BaseNavigator(navigationHolder),
SettingsRouter {

override fun returnToWallet() {
rootRouter.returnToWallet()
}

override fun openWallets() {
delegate.openWallets()
}
Expand Down Expand Up @@ -80,6 +86,8 @@ class SettingsNavigator(

override fun openLanguages() = performNavigation(R.id.action_mainFragment_to_languagesFragment)

override fun openAppearance() = performNavigation(R.id.action_mainFragment_to_appearanceFragment)

override fun openChangePinCode() = performNavigation(
actionId = R.id.action_change_pin_code,
args = PincodeFragment.getPinCodeBundle(PinCodeAction.Change)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import io.novafoundation.nova.app.root.navigation.NavigationHolder
import io.novafoundation.nova.app.root.navigation.Navigator
import io.novafoundation.nova.feature_assets.presentation.send.amount.SendPayload
import io.novafoundation.nova.feature_assets.presentation.balance.detail.BalanceDetailFragment
import io.novafoundation.nova.feature_assets.presentation.swap.AssetSwapFlowFragment
import io.novafoundation.nova.feature_assets.presentation.swap.SwapFlowPayload
import io.novafoundation.nova.feature_assets.presentation.swap.asset.AssetSwapFlowFragment
import io.novafoundation.nova.feature_assets.presentation.swap.asset.SwapFlowPayload
import io.novafoundation.nova.feature_swap_impl.presentation.SwapRouter
import io.novafoundation.nova.feature_swap_impl.presentation.confirmation.SwapConfirmationFragment
import io.novafoundation.nova.feature_swap_impl.presentation.confirmation.payload.SwapConfirmationPayload
Expand All @@ -33,12 +33,12 @@ class SwapNavigator(

override fun selectAssetIn(selectedAsset: AssetPayload?) {
val payload = SwapFlowPayload.ReselectAssetIn(selectedAsset)
navigationHolder.navController?.navigate(R.id.action_swapMainSettingsFragment_to_swapFlow, AssetSwapFlowFragment.getBundle(payload))
navigationHolder.navController?.navigate(R.id.action_swapSettingsFragment_to_select_swap_token_graph, AssetSwapFlowFragment.getBundle(payload))
}

override fun selectAssetOut(selectedAsset: AssetPayload?) {
val payload = SwapFlowPayload.ReselectAssetOut(selectedAsset)
navigationHolder.navController?.navigate(R.id.action_swapMainSettingsFragment_to_swapFlow, AssetSwapFlowFragment.getBundle(payload))
navigationHolder.navController?.navigate(R.id.action_swapSettingsFragment_to_select_swap_token_graph, AssetSwapFlowFragment.getBundle(payload))
}

override fun openSendCrossChain(destination: AssetPayload, recipientAddress: String?) {
Expand Down
86 changes: 63 additions & 23 deletions app/src/main/res/navigation/main_nav_graph.xml
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@

<action
android:id="@+id/action_open_swapSetupAmount"
app:destination="@id/start_swap_graph"
app:destination="@id/start_swap_nav_graph"
app:enterAnim="@anim/fragment_open_enter"
app:exitAnim="@anim/fragment_open_exit"
app:popEnterAnim="@anim/fragment_close_enter"
Expand Down Expand Up @@ -317,6 +317,14 @@
app:popEnterAnim="@anim/fragment_close_enter"
app:popExitAnim="@anim/fragment_close_exit" />

<action
android:id="@+id/action_mainFragment_to_appearanceFragment"
app:destination="@id/appearanceFragment"
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_mainFragment_to_currenciesFragment"
app:destination="@id/selectCurrencyFragment"
Expand Down Expand Up @@ -365,14 +373,6 @@
app:popEnterAnim="@anim/fragment_close_enter"
app:popExitAnim="@anim/fragment_close_exit" />

<action
android:id="@+id/action_mainFragment_to_assetFiltersFragment"
app:destination="@id/assetFiltersFragment"
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_mainFragment_to_nfts_nav_graph"
app:destination="@id/nfts_nav_graph"
Expand Down Expand Up @@ -479,7 +479,7 @@

<action
android:id="@+id/action_mainFragment_to_swapFlow"
app:destination="@id/swapFlowFragment"
app:destination="@id/select_swap_token_nav_graph"
app:enterAnim="@anim/fragment_open_enter"
app:exitAnim="@anim/fragment_open_exit"
app:popEnterAnim="@anim/fragment_close_enter"
Expand Down Expand Up @@ -596,6 +596,12 @@
android:label="LanguagesFragment"
tools:layout="@layout/fragment_languages" />

<fragment
android:id="@+id/appearanceFragment"
android:name="io.novafoundation.nova.feature_settings_impl.presentation.assetIcons.AppearanceFragment"
android:label="AppearanceFragment"
tools:layout="@layout/fragment_appearance" />

<fragment
android:id="@+id/walletDetailsFragment"
android:name="io.novafoundation.nova.feature_account_impl.presentation.account.details.WalletDetailsFragment"
Expand Down Expand Up @@ -847,11 +853,6 @@

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

<dialog
android:id="@+id/assetFiltersFragment"
android:name="io.novafoundation.nova.feature_assets.presentation.balance.filters.AssetFiltersBottomSheetFragment"
android:label="AssetFiltersFragment" />

<fragment
android:id="@+id/authorizedDAppsFragment"
android:name="io.novafoundation.nova.feature_dapp_impl.presentation.authorizedDApps.AuthorizedDAppsFragment"
Expand Down Expand Up @@ -885,7 +886,7 @@

<fragment
android:id="@+id/sendFlowFragment"
android:name="io.novafoundation.nova.feature_assets.presentation.send.flow.AssetSendFlowFragment"
android:name="io.novafoundation.nova.feature_assets.presentation.send.flow.asset.AssetSendFlowFragment"
android:label="AssetSendFlowFragment">

<action
Expand All @@ -897,22 +898,59 @@
app:popExitAnim="@anim/fragment_close_exit"
app:popUpTo="@id/mainFragment" />

<action
android:id="@+id/action_sendFlow_to_sendFlowNetwork"
app:destination="@id/sendFlowNetworkFragment"
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>

<fragment
android:id="@+id/receiveFlowFragment"
android:name="io.novafoundation.nova.feature_assets.presentation.receive.flow.AssetReceiveFlowFragment"
android:label="AssetReceiveFlowFragment" />
android:name="io.novafoundation.nova.feature_assets.presentation.receive.flow.asset.AssetReceiveFlowFragment"
android:label="AssetReceiveFlowFragment">

<action
android:id="@+id/action_receiveFlow_to_receiveFlowNetwork"
app:destination="@id/receiveFlowNetworkFragment"
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>

<fragment
android:id="@+id/buyFlowFragment"
android:name="io.novafoundation.nova.feature_assets.presentation.buy.flow.AssetBuyFlowFragment"
android:label="AssetBuyFlowFragment" />
android:name="io.novafoundation.nova.feature_assets.presentation.buy.flow.asset.AssetBuyFlowFragment"
android:label="AssetBuyFlowFragment">

<action
android:id="@+id/action_buyFlow_to_buyFlowNetwork"
app:destination="@id/buyFlowNetworkFragment"
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>

<fragment
android:id="@+id/swapFlowFragment"
android:name="io.novafoundation.nova.feature_assets.presentation.swap.AssetSwapFlowFragment"
android:label="AssetSwapFlowFragment" />
android:id="@+id/sendFlowNetworkFragment"
android:name="io.novafoundation.nova.feature_assets.presentation.send.flow.network.NetworkSendFlowFragment"
android:label="NetworkSendFlowFragment" />

<fragment
android:id="@+id/receiveFlowNetworkFragment"
android:name="io.novafoundation.nova.feature_assets.presentation.receive.flow.network.NetworkReceiveFlowFragment"
android:label="NetworkReceiveFlowFragment" />

<fragment
android:id="@+id/buyFlowNetworkFragment"
android:name="io.novafoundation.nova.feature_assets.presentation.buy.flow.network.NetworkBuyFlowFragment"
android:label="NetworkBuyFlowFragment" />

<fragment
android:id="@+id/walletConnectScanFragment"
Expand Down Expand Up @@ -1004,4 +1042,6 @@

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

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

</navigation>
33 changes: 33 additions & 0 deletions app/src/main/res/navigation/select_swap_token_nav_graph.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?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"
app:startDestination="@id/selectAssetSwapFlowFragment"
android:id="@+id/select_swap_token_nav_graph">

<fragment
android:id="@+id/selectAssetSwapFlowFragment"
android:name="io.novafoundation.nova.feature_assets.presentation.swap.asset.AssetSwapFlowFragment"
android:label="AssetSwapFlowFragment">

<action
android:id="@+id/action_selectAssetSwapFlowFragment_to_swapFlowNetworkFragment"
app:destination="@id/swapFlowNetworkFragment"
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>

<fragment
android:id="@+id/swapFlowNetworkFragment"
android:name="io.novafoundation.nova.feature_assets.presentation.swap.network.NetworkSwapFlowFragment"
android:label="NetworkSwapFlowFragment" />

<action
android:id="@+id/action_return_to_swap_settings"
app:popUpTo="@id/swapSettingsFragment"
app:enterAnim="@anim/fragment_close_enter"
app:exitAnim="@anim/fragment_close_exit"
app:popEnterAnim="@anim/fragment_open_enter"
app:popExitAnim="@anim/fragment_open_exit" />
</navigation>
17 changes: 7 additions & 10 deletions app/src/main/res/navigation/start_swap_nav_graph.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<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/start_swap_graph"
android:id="@+id/start_swap_nav_graph"
app:startDestination="@id/swapSettingsFragment">

<fragment
Expand All @@ -19,16 +19,16 @@
app:popExitAnim="@anim/fragment_close_exit" />

<action
android:id="@+id/action_swapMainSettingsFragment_to_swapFlow"
app:destination="@id/selectAssetSwapFlowFragment"
android:id="@+id/action_swapMainSettingsFragment_to_swapOptionsFragment"
app:destination="@id/swapOptionsFragment"
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_swapMainSettingsFragment_to_swapOptionsFragment"
app:destination="@id/swapOptionsFragment"
android:id="@+id/action_swapSettingsFragment_to_select_swap_token_graph"
app:destination="@id/select_swap_token_nav_graph"
app:enterAnim="@anim/fragment_open_enter"
app:exitAnim="@anim/fragment_open_exit"
app:popEnterAnim="@anim/fragment_close_enter"
Expand All @@ -53,14 +53,11 @@

</fragment>

<fragment
android:id="@+id/selectAssetSwapFlowFragment"
android:name="io.novafoundation.nova.feature_assets.presentation.swap.AssetSwapFlowFragment"
android:label="AssetSwapFlowFragment" />

<fragment
android:id="@+id/swapOptionsFragment"
android:name="io.novafoundation.nova.feature_swap_impl.presentation.options.SwapOptionsFragment"
android:label="SwapOptionsFragment" />

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

</navigation>
5 changes: 2 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.7.3'
versionCode = 157
versionName = '9.0.0'
versionCode = 158

applicationId = "io.novafoundation.nova"
releaseApplicationSuffix = "market"
Expand Down Expand Up @@ -176,7 +176,6 @@ buildscript {
jUnitDep = "junit:junit:$junitVersion"
mockitoDep = "org.mockito:mockito-inline:$mockitoVersion"
robolectricDep = "org.robolectric:robolectric:$robolectricVersion"
robolectricMultidexDep = "org.robolectric:shadows-multidex:$robolectricVersion"
archCoreTestDep = "androidx.arch.core:core-testing:$architectureComponentVersion"

progressButtonDep = "com.github.razir.progressbutton:progressbutton:$progressButtonsVersion"
Expand Down
Loading

0 comments on commit f82b380

Please sign in to comment.