Skip to content

Commit

Permalink
Increment to version 4.0.32
Browse files Browse the repository at this point in the history
  • Loading branch information
angelix committed Aug 13, 2024
1 parent 6eae371 commit aac89d2
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 12 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,20 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [4.0.32] - 2024-08-12

### Added
- Allow custom gap limit on personal Electrum server
- Allow adding a comment on a LNURL payment

### Changed
- Refactor Wallet overview options menu
- Bump GDK to version 0.72.2
- Bump Breez to version 0.5.2

- ### Fixed
- Various bug fixes

## [4.0.31] - 2024-07-02

### Added
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ import com.blockstream.common.gdk.data.NetworkEvent
import com.blockstream.common.gdk.data.Notification
import com.blockstream.common.gdk.data.Output
import com.blockstream.common.gdk.data.PreviousAddresses
import com.blockstream.common.gdk.data.Psbt
import com.blockstream.common.gdk.data.ProcessedTransactionDetails
import com.blockstream.common.gdk.data.Psbt
import com.blockstream.common.gdk.data.Settings
import com.blockstream.common.gdk.data.SignMessage
import com.blockstream.common.gdk.data.TorEvent
Expand Down Expand Up @@ -106,7 +106,6 @@ import com.blockstream.common.interfaces.JadeHttpRequestUrlValidator
import com.blockstream.common.lightning.AppGreenlightCredentials
import com.blockstream.common.lightning.LightningBridge
import com.blockstream.common.lightning.LightningManager
import com.blockstream.common.lightning.expireIn
import com.blockstream.common.lightning.fromInvoice
import com.blockstream.common.lightning.fromLnUrlPay
import com.blockstream.common.lightning.fromPayment
Expand Down Expand Up @@ -163,8 +162,6 @@ import kotlinx.serialization.json.put
import kotlinx.serialization.json.putJsonArray
import kotlinx.serialization.json.putJsonObject
import kotlin.math.absoluteValue
import kotlin.math.max
import kotlin.math.min

typealias EnrichedAssetPair = Pair<EnrichedAsset, Long>

Expand Down Expand Up @@ -2071,6 +2068,13 @@ class GdkSession constructor(
}
}

// In case of empty wallet, add one policy asset to display correctly the unit on wallet balance
if (walletAssets.isEmpty()) {
accounts.value.firstOrNull()?.network?.policyAsset?.also {
walletAssets[it] = 0
}
}

walletAssets.toSortedLinkedHashMap(::sortAssets).also {
_walletAssetsFlow.value = Assets(it)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,10 @@ class PinViewModel constructor(
wallet
}, preAction = {
onProgress.value = true
rocketAnimation.value = true
}, postAction = {
onProgress.value = it == null
rocketAnimation.value = it == null
}, onSuccess = {
postSideEffect(SideEffects.NavigateTo(NavigateDestinations.WalletOverview(it)))
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import com.blockstream.common.extensions.previewTransactionLook
import com.blockstream.common.extensions.previewWallet
import com.blockstream.common.extensions.toggle
import com.blockstream.common.gdk.data.Account
import com.blockstream.common.gdk.data.AccountAssetBalance
import com.blockstream.common.gdk.data.AccountBalance
import com.blockstream.common.gdk.data.WalletEvents
import com.blockstream.common.looks.account.LightningInfoLook
Expand Down Expand Up @@ -287,7 +286,7 @@ class WalletOverviewViewModel(greenWallet: GreenWallet) :
}.launchIn(this)
}

combine(session.walletTotalBalance, primaryBalanceInFiat, hideAmounts, session.settings()) { _, _, _, _ ->
combine(session.walletTotalBalance, session.walletAssets, primaryBalanceInFiat, hideAmounts, session.settings()) { _, _, _, _, _ ->
session.isConnected
}.filter { isConnected ->
// Prevent from updating on non connected sessions
Expand Down Expand Up @@ -329,7 +328,8 @@ class WalletOverviewViewModel(greenWallet: GreenWallet) :
_balanceSecondary.value = null
} else {
val balance = session.starsOrNull ?: session.walletTotalBalance.value.toAmountLook(
session = session
session = session,
assetId = session.walletAssets.value.policyId
)

val fiat = session.starsOrNull ?: session.walletTotalBalance.value.toAmountLook(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -377,8 +377,7 @@ abstract class CreateTransactionViewModelAbstract(
transaction = session.blindTransaction(network, transaction)
}


if ((session.isWatchOnly) || createPsbt) {
if (!transaction.isSweep() && (session.isWatchOnly || createPsbt)) {
// Create PSBT
ProcessedTransactionDetails(psbt = session.psbtFromJson(account.network, transaction).psbt)
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ fun PinScreen(
onProgress = onProgress,
onProgressDescription = onProgressDescription,
blurBackground = !rocketAnimation,
riveAnimation = if (viewModel.setupArgs.isRestoreFlow) RiveAnimation.ROCKET else null
riveAnimation = if(rocketAnimation) RiveAnimation.ROCKET else null
) {
Column(
modifier = Modifier
Expand Down
4 changes: 2 additions & 2 deletions green/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ android {
defaultConfig {
minSdk = libs.versions.androidMinSdk.get().toInt()
targetSdk = libs.versions.androidTargetSdk.get().toInt()
versionCode = 431
versionName = "4.0.31"
versionCode = 432
versionName = "4.0.32"

setProperty("archivesBaseName", "BlockstreamGreen-v$versionName")
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
Expand Down

0 comments on commit aac89d2

Please sign in to comment.