Skip to content

Commit 8ddf6fd

Browse files
committed
ui: limit address characters max in buildtransactionview
1 parent e4ab965 commit 8ddf6fd

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

BDKSwiftExampleWallet/View/Send/BuildTransactionView.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,9 @@ struct BuildTransactionView: View {
3333
HStack {
3434
Text("To")
3535
Spacer()
36-
Text(address)
36+
Text(address.count > 10 ? "\(address.prefix(6))...\(address.suffix(4))" : address)
3737
.lineLimit(1)
3838
.truncationMode(.middle)
39-
.frame(maxWidth: 100)
4039
}
4140
HStack {
4241
Text("Send")

0 commit comments

Comments
 (0)