Skip to content

Commit

Permalink
Merge pull request #197 from sora-xor/release_sora_v3.3.0.2
Browse files Browse the repository at this point in the history
Release sora v3.3.0.2
  • Loading branch information
arvifox authored Sep 9, 2023
2 parents 49c8bf5 + 2a338c9 commit e211974
Show file tree
Hide file tree
Showing 185 changed files with 2,625 additions and 2,242 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ play {
serviceAccountCredentials = file(System.env.CI_PLAY_KEY ?: "../key/fake.json")
track = "internal"
releaseStatus = ReleaseStatus.DRAFT
releaseName = "3.3.0.1 - SORA Card"
releaseName = "3.3.0.2 - SORA Card"
}

dependencies {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent
import javax.inject.Singleton
import jp.co.soramitsu.feature_assets_api.presentation.launcher.AssetsRouter
import jp.co.soramitsu.feature_assets_api.presentation.AssetsRouter
import jp.co.soramitsu.feature_main_api.launcher.MainRouter
import jp.co.soramitsu.feature_polkaswap_api.launcher.PolkaswapRouter
import jp.co.soramitsu.feature_referral_api.ReferralRouter
Expand Down
13 changes: 9 additions & 4 deletions app/src/main/java/jp/co/soramitsu/sora/navigation/Navigator.kt
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ import jp.co.soramitsu.common.presentation.compose.webview.title
import jp.co.soramitsu.common.presentation.compose.webview.url
import jp.co.soramitsu.common.util.BuildUtils
import jp.co.soramitsu.common.util.StringPair
import jp.co.soramitsu.feature_assets_api.presentation.launcher.AssetsRouter
import jp.co.soramitsu.feature_assets_api.presentation.AssetsRouter
import jp.co.soramitsu.feature_assets_impl.presentation.screens.assetdetails.AssetDetailsFragment
import jp.co.soramitsu.feature_assets_impl.presentation.screens.receiverequest.QRCodeFlowFragment
import jp.co.soramitsu.feature_assets_impl.presentation.screens.send.TransferAmountFragment
Expand All @@ -73,7 +73,13 @@ import jp.co.soramitsu.feature_sora_card_impl.presentation.get.card.GetSoraCardF
import jp.co.soramitsu.feature_wallet_api.launcher.WalletRouter
import jp.co.soramitsu.sora.R

class Navigator : MainRouter, WalletRouter, ReferralRouter, SelectNodeRouter, PolkaswapRouter, AssetsRouter {
class Navigator :
MainRouter,
WalletRouter,
ReferralRouter,
SelectNodeRouter,
PolkaswapRouter,
AssetsRouter {

private var navController: NavController? = null

Expand Down Expand Up @@ -228,12 +234,11 @@ class Navigator : MainRouter, WalletRouter, ReferralRouter, SelectNodeRouter, Po
navController?.popBackStack()
}

override fun openQrCodeFlow(shouldNavigateToScannerDirectly: Boolean, isLaunchedFromSoraCard: Boolean) {
override fun openQrCodeFlow(shouldNavigateToScannerDirectly: Boolean) {
navController?.navigate(
R.id.qrCodeFlow,
QRCodeFlowFragment.createBundle(
shouldNavigateToScanner = shouldNavigateToScannerDirectly,
isLaunchedFromSoraCard = isLaunchedFromSoraCard
)
)
}
Expand Down
14 changes: 7 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ buildscript {
insetter : '0.6.0',
truth : '1.1.5',
lottie : '4.2.0',
xNetworking : '0.0.60',
xNetworking : '0.0.61',
compose : '1.4.3',
composeMaterial : '1.4.3',
composeCompiler : '1.4.6',
composeConstraintLayout: '1.1.0-alpha05',
uiCore : '0.1.0',
soraCard : '0.1.33',
uiCore : '0.1.2',
soraCard : '0.1.40',
lazySodium : '5.0.2',
jna : '5.8.0',
accompanist : '0.30.1',
Expand All @@ -54,11 +54,11 @@ buildscript {
]

ext {
// soralution 106 3.4.0.0 2023.08.25
// sora dae 99 3.3.0.1 2023.08.28
// soralution 107 3.4.0.1 2023.09.08
// sora dae 100 3.3.0.1 2023.09.08
// appVersionCode = Integer.valueOf(System.env.BUILD_NUMBER ?: 96)
appVersionCode = Integer.valueOf(System.env.CI_BUILD_ID ?: 99)
appVersionName = '3.3.0.1'
appVersionCode = Integer.valueOf(System.env.CI_BUILD_ID ?: 100)
appVersionName = '3.3.0.2'

compileVersion = 33
minVersion = 24
Expand Down
1 change: 1 addition & 0 deletions common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ android {

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation project(":android-foundation")
implementation project(":soracrypro")

implementation activityKtxDep
Expand Down
81 changes: 0 additions & 81 deletions common/src/main/java/jp/co/soramitsu/common/base/BaseFragment.kt

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,12 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
package jp.co.soramitsu.common.base

import android.annotation.SuppressLint
import android.os.Build
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.Toast
import androidx.activity.compose.BackHandler
import androidx.compose.animation.ExperimentalAnimationApi
import androidx.compose.foundation.ScrollState
Expand Down Expand Up @@ -70,6 +72,7 @@ import jp.co.soramitsu.common.presentation.compose.components.AlertDialogContent
import jp.co.soramitsu.common.presentation.compose.components.Toolbar
import jp.co.soramitsu.common.presentation.compose.theme.SoraAppTheme
import jp.co.soramitsu.common.presentation.viewmodel.BaseViewModel
import jp.co.soramitsu.common.util.BuildUtils
import jp.co.soramitsu.common.util.DebounceClickHandler
import jp.co.soramitsu.common.util.ext.safeCast
import jp.co.soramitsu.ui_core.theme.customColors
Expand All @@ -90,6 +93,15 @@ abstract class SoraBaseFragment<T : BaseViewModel> : Fragment() {
activity?.safeCast<BarsColorhandler>()?.setColor(backgroundColor())
}

override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
if (BuildUtils.sdkAtLeast(Build.VERSION_CODES.TIRAMISU).not()) {
viewModel.copiedToast.observe {
Toast.makeText(requireActivity(), R.string.common_copied, Toast.LENGTH_SHORT).show()
}
}
}

@SuppressLint("UnusedMaterialScaffoldPaddingParameter")
override fun onCreateView(
inflater: LayoutInflater,
Expand Down Expand Up @@ -181,6 +193,7 @@ abstract class SoraBaseFragment<T : BaseViewModel> : Fragment() {
onNavClick = { debounceClickHandler.debounceClick(::onNavClicked) },
onActionClick = viewModel::onAction,
onMenuItemClick = viewModel::onMenuItem,
onSearch = viewModel::onToolbarSearch,
)
}
) { padding ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

package jp.co.soramitsu.common.di.modules

import android.content.ClipboardManager
import android.content.Context
import android.graphics.Color
import android.os.Build
Expand All @@ -51,6 +52,7 @@ import java.security.SecureRandom
import java.util.Locale
import java.util.TimeZone
import javax.inject.Singleton
import jp.co.soramitsu.androidfoundation.phone.BasicClipboardManager
import jp.co.soramitsu.backup.BackupService
import jp.co.soramitsu.common.BuildConfig
import jp.co.soramitsu.common.account.AccountAvatarGenerator
Expand All @@ -69,7 +71,6 @@ import jp.co.soramitsu.common.inappupdate.InAppUpdateManager
import jp.co.soramitsu.common.interfaces.WithProgress
import jp.co.soramitsu.common.io.FileManager
import jp.co.soramitsu.common.io.FileManagerImpl
import jp.co.soramitsu.common.resourses.ClipboardManager
import jp.co.soramitsu.common.resourses.LanguagesHolder
import jp.co.soramitsu.common.resourses.ResourceManager
import jp.co.soramitsu.common.util.CryptoAssistant
Expand Down Expand Up @@ -293,8 +294,8 @@ class CommonModule {

@Provides
@Singleton
fun provideClipBoardManager(@ApplicationContext context: Context): ClipboardManager {
return ClipboardManager(context.getSystemService(Context.CLIPBOARD_SERVICE) as android.content.ClipboardManager)
fun provideClipBoardManager(@ApplicationContext context: Context): BasicClipboardManager {
return BasicClipboardManager(context.getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager)
}

@Provides
Expand Down
7 changes: 7 additions & 0 deletions common/src/main/java/jp/co/soramitsu/common/domain/CardHub.kt
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ const val ASSETS_HUB_NAME = "assets"
const val POOLS_HUB_NAME = "pools"
const val GET_SORA_CARD_HUB_NAME = "get sora card"
const val BUY_XOR_TOKEN_HUB_NAME = "buy xor token"
const val REFERRAL_SYSTEM_HUB_NAME = "referral system"

data class CardHub(
val cardType: CardHubType,
Expand All @@ -65,6 +66,12 @@ enum class CardHubType(
boundToAccount = false,
R.string.common_buy_xor,
),
REFERRAL_SYSTEM(
REFERRAL_SYSTEM_HUB_NAME,
order = 2,
boundToAccount = false,
R.string.referral_toolbar_title,
),

ASSETS(ASSETS_HUB_NAME, order = 0, boundToAccount = true, R.string.liquid_assets),
POOLS(POOLS_HUB_NAME, order = 1, boundToAccount = true, R.string.pooled_assets),
Expand Down
2 changes: 1 addition & 1 deletion common/src/main/java/jp/co/soramitsu/common/domain/Fiat.kt
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ fun fiatChange(curValue: Double?, newValue: Double): Double =
if (curValue == null || curValue == 0.0) {
0.0
} else {
newValue / curValue - 1
(newValue / curValue) - 1
}

fun Token.calcFiat(amount: BigDecimal): Double? = fiatPrice?.let {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ fun Toolbar(
onNavClick: (() -> Unit)? = null,
onActionClick: (() -> Unit)? = null,
onMenuItemClick: ((Action) -> Unit)? = null,
onSearch: ((String) -> Unit)? = null,
) {
if (toolbarState != null && toolbarState.basic.visibility) {
val elevation = remember(scrollState) {
Expand All @@ -111,6 +112,7 @@ fun Toolbar(
onNavigate = onNavClick,
onAction = onActionClick,
onMenuItemClicked = onMenuItemClick,
onSearch = onSearch,
)
}
}
Loading

0 comments on commit e211974

Please sign in to comment.