-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support new on-the-fly funding (#632)
Now using lightning-kmp 1.8.0. - Updated the liquidity policy (see NodeParamsManager). We are using a policy that does not target additional liquidity and that does not use fee credit yet. - Updated the received-with database object with new types - Updated the liquidity-purchase database objects with new purchase & payment-details types. The lease data are now legacy and are removed wherever possible. - Updated the iOS and Android payment screens for liquidity purchases. Liquidity events are now stored as separate payments. These payments may be linked to incoming payments, if so a button is added in the liquidity screen to navigate to these payments. - (android) Completed the Portuguese (BR) translation. --------- Co-authored-by: Robbie Hanson <304604+robbiehanson@users.noreply.github.com>
- Loading branch information
1 parent
46397f8
commit 5fbe04e
Showing
124 changed files
with
4,417 additions
and
2,165 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
70 changes: 70 additions & 0 deletions
70
phoenix-android/src/main/kotlin/fr/acinq/phoenix/android/components/BottomSheetDialog.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
/* | ||
* Copyright 2024 ACINQ SAS | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package fr.acinq.phoenix.android.components | ||
|
||
import androidx.compose.foundation.layout.Column | ||
import androidx.compose.foundation.layout.ColumnScope | ||
import androidx.compose.foundation.layout.PaddingValues | ||
import androidx.compose.foundation.layout.fillMaxHeight | ||
import androidx.compose.foundation.layout.fillMaxWidth | ||
import androidx.compose.foundation.layout.padding | ||
import androidx.compose.foundation.rememberScrollState | ||
import androidx.compose.foundation.verticalScroll | ||
import androidx.compose.material.MaterialTheme | ||
import androidx.compose.material3.ExperimentalMaterial3Api | ||
import androidx.compose.material3.ModalBottomSheet | ||
import androidx.compose.material3.rememberModalBottomSheetState | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.Alignment | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.unit.dp | ||
|
||
@OptIn(ExperimentalMaterial3Api::class) | ||
@Composable | ||
fun BottomSheetDialog( | ||
onDismiss: () -> Unit, | ||
modifier: Modifier = Modifier, | ||
skipPartiallyExpanded: Boolean = true, | ||
horizontalAlignment: Alignment.Horizontal = Alignment.Start, | ||
scrimAlpha: Float = 0.2f, | ||
internalPadding: PaddingValues = PaddingValues(top = 0.dp, start = 20.dp, end = 20.dp, bottom = 64.dp), | ||
content: @Composable ColumnScope.() -> Unit, | ||
) { | ||
val sheetState = rememberModalBottomSheetState(skipPartiallyExpanded) | ||
ModalBottomSheet( | ||
sheetState = sheetState, | ||
onDismissRequest = { | ||
// executed when user click outside the sheet, and after sheet has been hidden thru state. | ||
onDismiss() | ||
}, | ||
modifier = modifier, | ||
containerColor = MaterialTheme.colors.surface, | ||
contentColor = MaterialTheme.colors.onSurface, | ||
scrimColor = MaterialTheme.colors.onBackground.copy(alpha = scrimAlpha), | ||
) { | ||
Column( | ||
horizontalAlignment = horizontalAlignment, | ||
modifier = Modifier | ||
.fillMaxWidth() | ||
.fillMaxHeight() | ||
.verticalScroll(rememberScrollState()) | ||
.padding(internalPadding) | ||
) { | ||
content() | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.