Skip to content

Commit 07a2795

Browse files
committed
Increment to version 5.4.0
1 parent 86f5470 commit 07a2795

8 files changed

Lines changed: 58 additions & 18 deletions

File tree

CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,28 @@ All notable changes to this project will be documented in this file.
33

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

6+
## [5.4.0] - 2026-05-02
7+
8+
### Added
9+
10+
- Aggregate fiat total balance across all wallet assets
11+
- Redesigned Send flow (recipient, select asset, select account)
12+
13+
### Fixed
14+
15+
- Transaction pagination in transact tab
16+
- Navigate directly to receive screen from account details
17+
- Update account name immediately after rename
18+
- Swap improvements
19+
- Retry logic and stability for watch-only wallet import
20+
21+
### Changed
22+
23+
- Migrate lightning from Breez to glsdk
24+
- Update GDK to Release 0.77.3
25+
- Bump countly-sdk-android
26+
- Update CI security checks
27+
628
## [5.3.0] - 2026-03-31
729

830
### Added

androidApp/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ android {
4545
defaultConfig {
4646
minSdk = libs.versions.androidMinSdk.get().toInt()
4747
targetSdk = libs.versions.androidTargetSdk.get().toInt()
48-
versionCode = 521
49-
versionName = "5.3.0"
48+
versionCode = 523
49+
versionName = "5.4.0"
5050

5151
base.archivesName = "BlockstreamGreen-v$versionName"
5252
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")

compose/src/commonMain/kotlin/com/blockstream/compose/extensions/EnrichedAsset.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ fun EnrichedAsset.nameStringHolderOrNull(session: GdkSession?): StringHolder? =
1212
// } else if (session != null && assetId.isPolicyAsset(session)) {
1313
// when {
1414
// assetId.isBitcoinPolicyAsset() -> "Bitcoin"
15-
// assetId.isLightningPolicyAsset() -> "Bitcoin (Lightning)"
15+
// assetId.isLightningPolicyAsset() -> "Lightning Bitcoin"
1616
// assetId.isPolicyAsset(session.liquid) -> "Liquid Bitcoin"
1717
// else -> throw Exception("No supported network")
1818
// }.let {

compose/src/commonMain/kotlin/com/blockstream/compose/screens/receive/ReceiveScreen.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ import com.blockstream.compose.theme.whiteMedium
9999
import com.blockstream.compose.utils.AnimatedNullableVisibility
100100
import com.blockstream.compose.utils.SetupScreen
101101
import com.blockstream.compose.utils.appTestTag
102+
import com.blockstream.compose.utils.stringResourceFromId
102103
import com.blockstream.data.data.AlertType
103104
import com.blockstream.data.data.DenominatedValue
104105
import com.blockstream.data.data.GreenWallet
@@ -352,7 +353,7 @@ fun ReceiveScreen(
352353
) {
353354
Column {
354355
Text(
355-
it,
356+
stringResourceFromId(it),
356357
style = bodyMedium,
357358
color = whiteMedium,
358359
modifier = Modifier.padding(horizontal = 8.dp)

data/src/commonMain/kotlin/com/blockstream/data/data/EnrichedAsset.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ data class EnrichedAsset constructor(
4545
} else if (session != null && assetId.isPolicyAsset(session)) {
4646
when {
4747
assetId.isBitcoinPolicyAsset() -> "Bitcoin"
48-
assetId.isLightningPolicyAsset() -> "Bitcoin (Lightning)"
48+
assetId.isLightningPolicyAsset() -> "Lightning Bitcoin"
4949
assetId.isPolicyAsset(session.liquid) -> "Liquid Bitcoin"
5050
else -> throw Exception("No supported network")
5151
}.let {
@@ -124,7 +124,7 @@ data class EnrichedAsset constructor(
124124
return (create(
125125
session = session,
126126
assetId = BTC_POLICY_ASSET
127-
).copy(assetId = LN_BTC_POLICY_ASSET, name = "Bitcoin (Lightning)"))
127+
).copy(assetId = LN_BTC_POLICY_ASSET, name = "Lightning Bitcoin"))
128128
}
129129

130130
val asset = session.getAsset(assetId)

data/src/commonMain/kotlin/com/blockstream/data/gdk/GdkSession.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ class GdkSession constructor(
424424
get() {
425425
if (_lightningAccount == null) {
426426
_lightningAccount = Account(
427-
gdkName = "Instant",
427+
gdkName = "Lightning",
428428
pointer = 0,
429429
type = AccountType.LIGHTNING
430430
).also {

data/src/commonMain/kotlin/com/blockstream/data/lightning/LightningSdk.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ class LightningSdk(
168168
}
169169

170170
suspend fun sendPayment(invoice: LightningInvoice, satoshi: Long?): SendPaymentResult = withNodeContext {
171-
logger.i { "Send payment of $satoshi sats - Invoice: ${invoice.bolt11} - NodeId: ${nodeInfoStateFlow.value.id}" }
171+
logger.i { "Send payment of ${satoshi ?: invoice.amountSatoshi} sats - Invoice: ${invoice.bolt11} - NodeId: ${nodeInfoStateFlow.value.id}" }
172172
greenlightSdk.sendPayment(invoice, satoshi)
173173
}
174174

domain/src/commonMain/kotlin/com/blockstream/domain/receive/GetReceiveAmountUseCase.kt

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -63,15 +63,19 @@ class GetReceiveAmountUseCase(
6363
}
6464
}
6565

66-
val quote = getQuoteUseCase(
67-
session = session,
68-
from = flowOf(SwapAsset.Lightning),
69-
to = flowOf(accountAsset.toSwapAsset()),
70-
satoshi = balance.map {
71-
it?.satoshi ?: 0
72-
},
73-
quoteMode = flowOf(QuoteMode.SEND)
74-
)
66+
val quote = if (accountAsset.account.isLightning) {
67+
flowOf(null)
68+
} else {
69+
getQuoteUseCase(
70+
session = session,
71+
from = flowOf(SwapAsset.Lightning),
72+
to = flowOf(accountAsset.toSwapAsset()),
73+
satoshi = balance.map {
74+
it?.satoshi ?: 0
75+
},
76+
quoteMode = flowOf(QuoteMode.SEND)
77+
)
78+
}
7579

7680
return combine(
7781
amount,
@@ -138,9 +142,11 @@ class GetReceiveAmountUseCase(
138142
}
139143
}
140144

145+
val minOpenChannel = 25000L
146+
141147
// Use as a workaround for newly created wallets (nodeInfo.maxReceivableSatoshi() == 0L && balance.satoshi >= 5000)
142148
val isValid =
143-
balance != null && error == null && (balance.satoshi >= 0 && (balance.satoshi <= nodeInfo.maxReceivableSatoshi() || (nodeInfo.maxReceivableSatoshi() == 0L && balance.satoshi >= 5000)) && (balance.satoshi <= totalInboundLiquiditySatoshi || (balance.satoshi > (openChannelFee?.feeSatoshi()
149+
balance != null && error == null && (balance.satoshi >= 0 && (balance.satoshi <= nodeInfo.maxReceivableSatoshi() || (nodeInfo.maxReceivableSatoshi() == 0L && balance.satoshi >= minOpenChannel)) && (balance.satoshi <= totalInboundLiquiditySatoshi || (balance.satoshi > (openChannelFee?.feeSatoshi()
144150
?: 0))))
145151

146152
val hint = nodeInfo.maxReceivableSatoshi().toAmountLook(
@@ -196,6 +202,17 @@ class GetReceiveAmountUseCase(
196202
"id_a_funding_fee_of_s_s_is_applied|$channelFee|$channelFeeFiat|$inboundLiquidity|$inboundLiquidityFiat"
197203
}
198204

205+
nodeInfo.maxReceivableSatoshi() == 0L && balance != null && balance.satoshi < minOpenChannel -> {
206+
"id_amount_must_be_at_least_s|${
207+
minOpenChannel.toAmountLook(
208+
session = session,
209+
assetId = accountAsset.account.network.policyAsset,
210+
denomination = denomination.notFiat(),
211+
withUnit = true
212+
)
213+
}"
214+
}
215+
199216
else -> null
200217
}
201218

0 commit comments

Comments
 (0)