Skip to content

Commit

Permalink
Hotfix 2.4.1 (#641)
Browse files Browse the repository at this point in the history
This commit contains the fixes for 2.4.1:
- increment build code for iOS (83) and Android (94)
- use lightning-kmp 1.8.4
  • Loading branch information
dpad85 authored Oct 18, 2024
1 parent 8a83fe7 commit 1919b1a
Show file tree
Hide file tree
Showing 11 changed files with 52 additions and 24 deletions.
2 changes: 1 addition & 1 deletion buildSrc/src/main/kotlin/Versions.kt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
object Versions {
const val lightningKmp = "1.8.1"
const val lightningKmp = "1.8.4"
const val secp256k1 = "0.14.0"
const val torMobile = "0.2.0"

Expand Down
2 changes: 1 addition & 1 deletion phoenix-android/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ android {
applicationId = "fr.acinq.phoenix.testnet"
minSdk = 26
targetSdk = 34
versionCode = 93
versionCode = 94
versionName = gitCommitHash()
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
resourceConfigurations.addAll(listOf("en", "fr", "de", "es", "b+es+419", "cs", "pt-rBR", "sk", "vi", "sw"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ import kotlinx.coroutines.flow.filterNotNull
import kotlinx.coroutines.flow.first
import kotlinx.coroutines.launch
import org.slf4j.LoggerFactory
import kotlin.time.Duration.Companion.seconds

sealed class LightningInvoiceState {
data object Init : LightningInvoiceState()
Expand Down Expand Up @@ -108,7 +109,7 @@ class ReceiveViewModel(
paymentPreimage = Lightning.randomBytes32(),
amount = amount,
description = Either.Left(description),
expirySeconds = expirySeconds
expiry = expirySeconds.seconds
)
lightningQRBitmap = BitmapHelper.generateBitmap(pr.write()).asImageBitmap()
log.debug("generated new invoice=${pr.write()}")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ class LegacyMigrationHelperTest {
received = IncomingPayment.Received(
receivedWith = listOf(
IncomingPayment.ReceivedWith.NewChannel(
amount = 32_000_000.msat,
amountReceived = 32_000_000.msat,
serviceFee = 0.msat,
miningFee = 0.sat,
channelId = ByteVector32.Zeroes,
Expand All @@ -268,9 +268,10 @@ class LegacyMigrationHelperTest {
received = IncomingPayment.Received(
receivedWith = listOf(
IncomingPayment.ReceivedWith.LightningPayment(
amount = 55_000.msat,
amountReceived = 55_000.msat,
channelId = ByteVector32.Zeroes,
htlcId = 0
htlcId = 0,
fundingFee = null
)
),
receivedAt = 1656337800788
Expand All @@ -290,9 +291,10 @@ class LegacyMigrationHelperTest {
received = IncomingPayment.Received(
receivedWith = listOf(
IncomingPayment.ReceivedWith.LightningPayment(
amount = 350_000.msat,
amountReceived = 350_000.msat,
channelId = ByteVector32.Zeroes,
htlcId = 0
htlcId = 0,
fundingFee = null
)
),
receivedAt = 1656338085497
Expand All @@ -314,7 +316,7 @@ class LegacyMigrationHelperTest {
received = IncomingPayment.Received(
receivedWith = listOf(
IncomingPayment.ReceivedWith.NewChannel(
amount = 57_000_000.msat,
amountReceived = 57_000_000.msat,
channelId = ByteVector32.Zeroes,
serviceFee = 3_000_000.msat,
miningFee = 0.sat,
Expand All @@ -341,10 +343,9 @@ class LegacyMigrationHelperTest {
received = IncomingPayment.Received(
receivedWith = listOf(
IncomingPayment.ReceivedWith.NewChannel(
amount = 562_212_000.msat,
amountReceived = 562_212_000.msat,
channelId = ByteVector32.Zeroes,
txId = TxId(
ByteVector32.Zeroes),
txId = TxId(ByteVector32.Zeroes),
serviceFee = 5_678_000.msat,
miningFee = 0.sat,
confirmedAt = 1656403752448,
Expand Down
12 changes: 6 additions & 6 deletions phoenix-ios/phoenix-ios.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -2353,7 +2353,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = "AppIcon-Blue";
CODE_SIGN_ENTITLEMENTS = "phoenix-ios/Phoenix.entitlements";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 82;
CURRENT_PROJECT_VERSION = 83;
DEVELOPMENT_ASSET_PATHS = "\"phoenix-ios/Preview Content\"";
DEVELOPMENT_TEAM = XD77LN4376;
ENABLE_PREVIEWS = YES;
Expand All @@ -2378,7 +2378,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = "AppIcon-Blue";
CODE_SIGN_ENTITLEMENTS = "phoenix-ios/Phoenix.entitlements";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 82;
CURRENT_PROJECT_VERSION = 83;
DEVELOPMENT_ASSET_PATHS = "\"phoenix-ios/Preview Content\"";
DEVELOPMENT_TEAM = XD77LN4376;
ENABLE_PREVIEWS = YES;
Expand Down Expand Up @@ -2480,7 +2480,7 @@
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CODE_SIGN_IDENTITY = "";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 82;
CURRENT_PROJECT_VERSION = 83;
DEVELOPMENT_TEAM = XD77LN4376;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
Expand Down Expand Up @@ -2509,7 +2509,7 @@
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CODE_SIGN_IDENTITY = "";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 82;
CURRENT_PROJECT_VERSION = 83;
DEVELOPMENT_TEAM = XD77LN4376;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
Expand Down Expand Up @@ -2538,7 +2538,7 @@
CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
CODE_SIGN_ENTITLEMENTS = "phoenix-notifySrvExt/phoenix-notifySrvExt.entitlements";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 82;
CURRENT_PROJECT_VERSION = 83;
DEVELOPMENT_TEAM = XD77LN4376;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = "phoenix-notifySrvExt/Info.plist";
Expand All @@ -2565,7 +2565,7 @@
CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
CODE_SIGN_ENTITLEMENTS = "phoenix-notifySrvExt/phoenix-notifySrvExt.entitlements";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 82;
CURRENT_PROJECT_VERSION = 83;
DEVELOPMENT_TEAM = XD77LN4376;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = "phoenix-notifySrvExt/Info.plist";
Expand Down
26 changes: 25 additions & 1 deletion phoenix-ios/phoenix-ios/Localizable.xcstrings
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,7 @@
},
"(completed) of (total)" : {
"comment" : "Upload progress information",
"extractionState" : "stale",
"localizations" : {
"ar" : {
"stringUnit" : {
Expand Down Expand Up @@ -532,6 +533,7 @@
},
"(completed) of (total), pushing batch of (inFlight)" : {
"comment" : "Upload progress information",
"extractionState" : "stale",
"localizations" : {
"ar" : {
"stringUnit" : {
Expand Down Expand Up @@ -615,6 +617,7 @@
},
"(count) payments within the last 2 hours" : {
"comment" : "Recent payments footer",
"extractionState" : "stale",
"localizations" : {
"ar" : {
"stringUnit" : {
Expand Down Expand Up @@ -656,6 +659,7 @@
},
"(count) payments within the last 3 days" : {
"comment" : "Recent payments footer",
"extractionState" : "stale",
"localizations" : {
"ar" : {
"stringUnit" : {
Expand Down Expand Up @@ -697,6 +701,7 @@
},
"(count) payments within the last 7 days" : {
"comment" : "Recent payments footer",
"extractionState" : "stale",
"localizations" : {
"ar" : {
"stringUnit" : {
Expand Down Expand Up @@ -738,6 +743,7 @@
},
"(count) payments within the last 10 minutes" : {
"comment" : "Recent payments footer",
"extractionState" : "stale",
"localizations" : {
"ar" : {
"stringUnit" : {
Expand Down Expand Up @@ -779,6 +785,7 @@
},
"(count) payments within the last 24 hours" : {
"comment" : "Recent payments footer",
"extractionState" : "stale",
"localizations" : {
"ar" : {
"stringUnit" : {
Expand Down Expand Up @@ -820,6 +827,7 @@
},
"(count) payments within the last minute" : {
"comment" : "Recent payments footer",
"extractionState" : "stale",
"localizations" : {
"ar" : {
"stringUnit" : {
Expand Down Expand Up @@ -1469,6 +1477,7 @@
},
"(totalPaymentCount) in-flight payments" : {
"comment" : "Recent payments footer",
"extractionState" : "stale",
"localizations" : {
"ar" : {
"stringUnit" : {
Expand Down Expand Up @@ -1510,6 +1519,7 @@
},
"(totalPaymentCount) recent payments" : {
"comment" : "Recent payments footer",
"extractionState" : "stale",
"localizations" : {
"ar" : {
"stringUnit" : {
Expand Down Expand Up @@ -6237,6 +6247,7 @@
},
"Amount must be (exactBitcoin.string)" : {
"comment" : "error message",
"extractionState" : "stale",
"localizations" : {
"ar" : {
"stringUnit" : {
Expand Down Expand Up @@ -6278,6 +6289,7 @@
},
"Amount must be (exactBitcoin.string) (≈ (approxFiat.string))" : {
"comment" : "error message",
"extractionState" : "stale",
"localizations" : {
"ar" : {
"stringUnit" : {
Expand Down Expand Up @@ -6319,6 +6331,7 @@
},
"Amount must be at least (minBitcoin.string)" : {
"comment" : "error message",
"extractionState" : "stale",
"localizations" : {
"ar" : {
"stringUnit" : {
Expand Down Expand Up @@ -6360,6 +6373,7 @@
},
"Amount must be at least (minBitcoin.string) (≈ (approxFiat.string))" : {
"comment" : "error message",
"extractionState" : "stale",
"localizations" : {
"ar" : {
"stringUnit" : {
Expand Down Expand Up @@ -6401,6 +6415,7 @@
},
"Amount must be at most (maxBitcoin.string)" : {
"comment" : "error message",
"extractionState" : "stale",
"localizations" : {
"ar" : {
"stringUnit" : {
Expand Down Expand Up @@ -6442,6 +6457,7 @@
},
"Amount must be at most (maxBitcoin.string) (≈ (approxFiat.string))" : {
"comment" : "error message",
"extractionState" : "stale",
"localizations" : {
"ar" : {
"stringUnit" : {
Expand Down Expand Up @@ -8673,7 +8689,7 @@
}
},
"Bitcoin address" : {
"comment" : "TextField placeholder",
"comment" : "TextField placeholder\nType of text being copied",
"localizations" : {
"ar" : {
"stringUnit" : {
Expand Down Expand Up @@ -24533,6 +24549,7 @@
},
"Lightning fee amount: (percent), (amountBitcoin), ≈(amountFiat)" : {
"comment" : "VoiceOver label: PaymentSummaryView",
"extractionState" : "stale",
"localizations" : {
"ar" : {
"stringUnit" : {
Expand Down Expand Up @@ -26948,6 +26965,7 @@
},
"Miner fee amount: (percent), (amountBitcoin), ≈(amountFiat)" : {
"comment" : "VoiceOver label: PaymentSummaryView",
"extractionState" : "stale",
"localizations" : {
"ar" : {
"stringUnit" : {
Expand Down Expand Up @@ -32668,6 +32686,7 @@

},
"QR code" : {
"comment" : "Type of image being copied",
"localizations" : {
"ar" : {
"stringUnit" : {
Expand Down Expand Up @@ -42510,6 +42529,7 @@
},
"Tip amount: (percent), (amountBitcoin), ≈(amountFiat)" : {
"comment" : "VoiceOver label: PaymentSummaryView",
"extractionState" : "stale",
"localizations" : {
"ar" : {
"stringUnit" : {
Expand Down Expand Up @@ -42551,6 +42571,7 @@
},
"tip amount: (tipBtcn), ≈(tipFiat), total amount: (ttlBtcn), ≈(ttlFiat)" : {
"comment" : "VoiceOver information: Customize tip sheet",
"extractionState" : "stale",
"localizations" : {
"ar" : {
"stringUnit" : {
Expand Down Expand Up @@ -43324,6 +43345,7 @@
},
"Total amount: (amountBitcoin), ≈(amountFiat)" : {
"comment" : "VoiceOver label: PaymentSummaryView",
"extractionState" : "stale",
"localizations" : {
"ar" : {
"stringUnit" : {
Expand Down Expand Up @@ -43365,6 +43387,7 @@
},
"total amount: (btcnAmt.string), ≈(fiatAmt.string)" : {
"comment" : "VoiceOver hint",
"extractionState" : "stale",
"localizations" : {
"ar" : {
"stringUnit" : {
Expand Down Expand Up @@ -43448,6 +43471,7 @@
},
"total amount: ≈(btcnAmt.string)" : {
"comment" : "VoiceOver hint",
"extractionState" : "stale",
"localizations" : {
"ar" : {
"stringUnit" : {
Expand Down
3 changes: 2 additions & 1 deletion phoenix-ios/phoenix-ios/prefs/UserDefaults+Codable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,8 @@ struct LiquidityPolicy: Equatable, Codable {
maxAbsoluteFee: effectiveMaxFee,
maxRelativeFeeBasisPoints: effectiveMaxFeeBasisPoints,
skipAbsoluteFeeCheck: effectiveSkipAbsoluteFeeCheck,
maxAllowedFeeCredit: effectiveMaxAllowedFeeCredit
maxAllowedFeeCredit: effectiveMaxAllowedFeeCredit,
considerOnlyMiningFeeForAbsoluteFeeCheck: false // keep this in check with the default value in lightning-kmp
)

} else {
Expand Down
2 changes: 1 addition & 1 deletion phoenix-legacy/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ android {
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
val libCode = 93
val libCode = 94
getByName("debug") {
resValue("string", "CHAIN", chain)
buildConfigField("String", "CHAIN", chain)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import fr.acinq.phoenix.PhoenixBusiness
import fr.acinq.phoenix.controllers.AppController
import fr.acinq.phoenix.managers.PeerManager
import kotlinx.coroutines.launch
import kotlin.time.Duration.Companion.seconds


class AppReceiveController(
Expand All @@ -48,7 +49,7 @@ class AppReceiveController(
paymentPreimage = randomBytes32(),
amount = intent.amount,
description = Either.Left(intent.description),
expirySeconds = intent.expirySeconds
expiry = intent.expirySeconds.seconds
)
model(Receive.Model.Generated(paymentRequest.write(), paymentRequest.paymentHash.toHex(), paymentRequest.amount, paymentRequest.description))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ import kotlinx.serialization.json.intOrNull
import kotlinx.serialization.json.jsonArray
import kotlinx.serialization.json.jsonPrimitive
import kotlin.time.Duration
import kotlin.time.Duration.Companion.days
import kotlin.time.Duration.Companion.seconds
import kotlin.time.TimeSource

Expand Down Expand Up @@ -393,7 +394,7 @@ class AppScanController(
paymentPreimage = Lightning.randomBytes32(),
amount = intent.amount,
description = Either.Left(intent.description ?: intent.lnurlWithdraw.defaultDescription),
expirySeconds = (3600 * 24 * 7).toLong(), // one week
expiry = 7.days
)

if (requestId != lnurlRequestId) {
Expand Down
Loading

0 comments on commit 1919b1a

Please sign in to comment.