Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@

## Easy and secure
Brainwallet is a easy and fun way to use your crypto (Litecoin) and memorize your seed words

### Release notes

- v4.5.4
- Added new MP Buy UI
4 changes: 2 additions & 2 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ android {
applicationId = "ltd.grunt.brainwallet"
minSdk = 29
targetSdk = 36
versionCode = 202506273
versionName = "v4.7.1"
versionCode = 202506295
versionName = "v4.7.2"

multiDexEnabled = true
base.archivesName.set("${defaultConfig.versionName}(${defaultConfig.versionCode})")
Expand Down
2 changes: 1 addition & 1 deletion app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
-dontwarn org.slf4j.impl.StaticLoggerBinder
-dontwarn org.slf4j.impl.StaticMDCBinder
-dontwarn org.slf4j.impl.StaticMarkerBinder

-dontwarn java.lang.reflect.AnnotatedType

-keepclasseswithmembernames class * {
native <methods>;
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/com/brainwallet/data/model/Fee.kt
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,4 @@ fun FeeOption.getFiatFormatted(currencyEntity: CurrencyEntity): String {
fun List<FeeOption>.getSelectedIndex(selectedFeeType: String): Int {
return indexOfFirst { it.type == selectedFeeType }.takeIf { it >= 0 }
?: 2 //2 -> index of top, since we have [low,medium,top]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
import timber.log.Timber
import com.google.firebase.analytics.FirebaseAnalytics


//provide old navigation using intent activity
Expand All @@ -35,6 +36,7 @@ object LegacyNavigation {
auth: Boolean
) {
Timber.i("timber: startBreadActivity: %s", from.javaClass.name)

val intent = if (auth) BrainwalletActivity.createIntent(from, Route.UnLock())
else Intent(from, BreadActivity::class.java)
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK)
Expand Down
4 changes: 4 additions & 0 deletions app/src/main/java/com/brainwallet/ui/BrainwalletActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import com.brainwallet.ui.screens.inputwords.InputWordsViewModel.Companion.LEGAC
import com.brainwallet.ui.screens.inputwords.InputWordsViewModel.Companion.LEGACY_DIALOG_WIPE_ALERT
import com.brainwallet.ui.screens.inputwords.InputWordsViewModel.Companion.LEGACY_EFFECT_RESET_PIN
import com.brainwallet.ui.screens.yourseedproveit.YourSeedProveItViewModel.Companion.LEGACY_EFFECT_ON_PAPERKEY_PROVED
import com.brainwallet.ui.screens.yourseedproveit.YourSeedProveItViewModel.Companion.LEGACY_NAVIGATE_TO_HOME
import com.brainwallet.ui.theme.BrainwalletAppTheme
import com.brainwallet.util.EventBus
import com.brainwallet.wallet.BRWalletManager
Expand Down Expand Up @@ -115,6 +116,9 @@ class BrainwalletActivity : BRActivity() {

LEGACY_EFFECT_ON_PAPERKEY_PROVED -> {
BRSharedPrefs.putPhraseWroteDown(this@BrainwalletActivity, true)
}

LEGACY_NAVIGATE_TO_HOME -> {
LegacyNavigation.startBreadActivity(
this@BrainwalletActivity,
false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ fun BuyLitecoinScreen(
val loadingState by viewModel.loadingState.collectAsState()
val appSetting by viewModel.appSetting.collectAsState()
val context = LocalContext.current

LaunchedEffect(Unit) {
viewModel.onEvent(BuyLitecoinEvent.OnLoad(context))
viewModel.uiEffect.collect { effect ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ sealed class SettingsEvent {
val shareAnalyticsDataEnabled: Boolean = false,
val lastSyncMetadata: String? = null,
) : SettingsEvent()

object OnSecurityUpdatePinClick : SettingsEvent()
object OnSecuritySeedPhraseClick : SettingsEvent()
object OnSecurityShareAnalyticsDataClick : SettingsEvent()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ import androidx.compose.material3.SegmentedButtonDefaults
import androidx.compose.material3.SingleChoiceSegmentedButtonRow
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableIntStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.stringResource
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ fun ReceiveDialog(
val appSetting by viewModel.appSetting.collectAsState()
val context = LocalContext.current
val wheelPickerFiatCurrencyState = rememberWheelPickerState(0)

LaunchedEffect(Unit) {
viewModel.onEvent(ReceiveDialogEvent.OnLoad(context))
viewModel.uiEffect.collect { effect ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.dp
import androidx.lifecycle.viewmodel.compose.viewModel
import com.brainwallet.R
import com.brainwallet.navigation.LegacyNavigation
import com.brainwallet.navigation.OnNavigate
import com.brainwallet.navigation.Route
import com.brainwallet.navigation.UiEffect
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import androidx.compose.foundation.layout.aspectRatio
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.offset
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.systemBars
import androidx.compose.foundation.layout.width
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,7 @@ sealed class YourSeedProveItEvent {

object OnGameAndSync : YourSeedProveItEvent()

object OnCompletedPaperKey : YourSeedProveItEvent()

object OnClear : YourSeedProveItEvent()
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ import com.brainwallet.R
import com.brainwallet.navigation.OnNavigate
import com.brainwallet.navigation.Route
import com.brainwallet.navigation.UiEffect
import com.brainwallet.tools.manager.AnalyticsManager
import com.brainwallet.tools.util.BRConstants
import com.brainwallet.ui.composable.BrainwalletScaffold
import com.brainwallet.ui.composable.BrainwalletTopAppBar
import com.brainwallet.ui.composable.LargeButton
Expand Down Expand Up @@ -86,6 +88,8 @@ fun YourSeedProveItScreen(
LaunchedEffect(state.orderCorrected) {
if (state.orderCorrected) {
coinAudioPlayer.start()
viewModel.onEvent(YourSeedProveItEvent.OnCompletedPaperKey)
AnalyticsManager.logCustomEvent(BRConstants._20250303_DSTU)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,17 @@ class YourSeedProveItViewModel : BrainwalletViewModel<YourSeedProveItEvent>() {
}

YourSeedProveItEvent.OnGameAndSync -> viewModelScope.launch {
EventBus.emit(EventBus.Event.Message(LEGACY_NAVIGATE_TO_HOME))
}

YourSeedProveItEvent.OnCompletedPaperKey -> viewModelScope.launch {
EventBus.emit(EventBus.Event.Message(LEGACY_EFFECT_ON_PAPERKEY_PROVED))
}
}
}

companion object {
const val LEGACY_EFFECT_ON_PAPERKEY_PROVED = "onPaperKeyProved"
const val LEGACY_NAVIGATE_TO_HOME = "navigateToHome"
}
}
28 changes: 14 additions & 14 deletions app/src/test/java/com/brainwallet/tools/util/BRConstantsTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ class BRConstantsTest {

@Test
fun `validate App external URL constant`(){
assertSame(BRConstants.TWITTER_LINK,"https://twitter.com/Brainwallet_App");
assertSame(BRConstants.INSTAGRAM_LINK,"https://www.instagram.com/brainwalletapp");
assertSame(BRConstants.WEB_LINK,"https://brainwallet.co");
assertSame(BRConstants.TOS_LINK,"https://brainwallet.co/privacy-policy.html");
assertSame(BRConstants.MOBILE_MP_LINK,"https://brainwallet.co/mobile-top-up.html");
assertSame(BRConstants.BITREFILL_AFFILIATE_LINK,"https://www.bitrefill.com/");
assertSame(BRConstants.TWITTER_LINK,"https://twitter.com/Brainwallet_App")
assertSame(BRConstants.INSTAGRAM_LINK,"https://www.instagram.com/brainwalletapp")
assertSame(BRConstants.WEB_LINK,"https://brainwallet.co")
assertSame(BRConstants.TOS_LINK,"https://brainwallet.co/privacy-policy.html")
assertSame(BRConstants.MOBILE_MP_LINK,"https://brainwallet.co/mobile-top-up.html")
assertSame(BRConstants.BITREFILL_AFFILIATE_LINK,"https://www.bitrefill.com/")
}

@Test
Expand Down Expand Up @@ -89,24 +89,24 @@ class BRConstantsTest {
// public ActivityScenarioRule<IntroActivity> mActivityRule = new ActivityScenarioRule<>(IntroActivity.class);
// @Before
// public void setUp() {
// Log.e(TAG, "setUp: ");
// Log.e(TAG, "setUp: ")
// }
//
// @After
// public void tearDown() {
// }
// @Test
// public void testLitecoinSymbolConstants() {
// Assert.assertSame(BRConstants.litecoinLowercase,"Ε‚");
// Assert.assertSame(BRConstants.litecoinUppercase,"Ł");
// Assert.assertSame(BRConstants.litecoinLowercase,"Ε‚")
// Assert.assertSame(BRConstants.litecoinUppercase,"Ł")
// }
// @Test
// public void testAppExternalURLConstants() {
// Assert.assertSame(BRConstants.TWITTER_LINK,"https://twitter.com/Brainwallet_App");
// Assert.assertSame(BRConstants.WEB_LINK,"https://brainwallet.co");
// Assert.assertSame(BRConstants.TOS_LINK,"https://brainwallet.co/privacy");
// Assert.assertSame(BRConstants.CUSTOMER_SUPPORT_LINK,"https://support.brainwallet.co/hc/en-us/requests/new");
// Assert.assertSame(BRConstants.BITREFILL_AFFILIATE_LINK,"https://www.bitrefill.com/");
// Assert.assertSame(BRConstants.TWITTER_LINK,"https://twitter.com/Brainwallet_App")
// Assert.assertSame(BRConstants.WEB_LINK,"https://brainwallet.co")
// Assert.assertSame(BRConstants.TOS_LINK,"https://brainwallet.co/privacy")
// Assert.assertSame(BRConstants.CUSTOMER_SUPPORT_LINK,"https://support.brainwallet.co/hc/en-us/requests/new")
// Assert.assertSame(BRConstants.BITREFILL_AFFILIATE_LINK,"https://www.bitrefill.com/")
// }
// @Test
// public void testFirebaseAnalyticsConstants() {
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[versions]
kotlin = "2.0.0"
agp = "8.5.1"
agp = "8.7.3"
androidx-core-ktx = "1.12.0"
androidx-appcompat = "1.6.1"
androidx-legacy-support = "1.0.0"
Expand Down
2 changes: 1 addition & 1 deletion modules/games
Submodule games updated from a5f408 to b2cc09