Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
8 changes: 8 additions & 0 deletions app/src/main/java/com/metamask/dapp/DappActionsScreen.kt
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,19 @@ fun DappActionsScreen(
Heading("Dapp Actions")

DappLabel(
labelPrefix = "Account:",
text = ethereumState.selectedAddress,
color = Color.Unspecified,
modifier = Modifier.padding(bottom = 36.dp)
)

DappLabel(
labelPrefix = "ChainId:",
text = ethereumState.chainId,
color = Color.Unspecified,
modifier = Modifier.padding(bottom = 36.dp)
)

Spacer(modifier = Modifier.weight(1f))

// Sign message button
Expand Down
9 changes: 9 additions & 0 deletions app/src/main/java/com/metamask/dapp/DappLabel.kt
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,20 @@ import androidx.compose.ui.unit.sp

@Composable
fun DappLabel(
labelPrefix: String = "",
text: String,
color: Color = Color.White,
fontSize: TextUnit = 14.sp,
modifier: Modifier = Modifier.padding(bottom = 12.dp)
) {
if (labelPrefix.isNotEmpty()) {
Text(
text = labelPrefix,
color = color,
fontSize = fontSize.times(1.3),
modifier = Modifier.padding(bottom = 5.dp)
)
}
Text(
text = text,
color = color,
Expand Down