Compare commits
1 Commits
transactio
...
blink-wall
| Author | SHA1 | Date | |
|---|---|---|---|
|
b6dad349c9
|
BIN
damus/Assets.xcassets/Logos/bbw.imageset/bbw.jpg
vendored
BIN
damus/Assets.xcassets/Logos/bbw.imageset/bbw.jpg
vendored
Binary file not shown.
|
Before Width: | Height: | Size: 14 KiB |
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "bbw.jpg",
|
||||
"filename" : "blink.png",
|
||||
"idiom" : "universal"
|
||||
}
|
||||
],
|
||||
BIN
damus/Assets.xcassets/Logos/blink.imageset/blink.png
vendored
Normal file
BIN
damus/Assets.xcassets/Logos/blink.imageset/blink.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 115 KiB |
@@ -83,8 +83,10 @@ enum Wallet: String, CaseIterable, Identifiable, StringCodable {
|
||||
return .init(index: 9, tag: "breez", displayName: "Breez", link: "breez:",
|
||||
appStoreLink: "https://apps.apple.com/us/app/breez-lightning-client-pos/id1463604142", image: "breez")
|
||||
case .bitcoinbeach:
|
||||
return .init(index: 10, tag: "bitcoinbeach", displayName: "Bitcoin Beach", link: "bitcoinbeach://",
|
||||
appStoreLink: "https://apps.apple.com/sv/app/bitcoin-beach-wallet/id1531383905", image: "bbw")
|
||||
// Blink used to be called Bitcoin Beach.
|
||||
// We have to keep the tag called "bitcoinbeach" for backwards compatibility.
|
||||
return .init(index: 10, tag: "bitcoinbeach", displayName: "Blink", link: "blink://",
|
||||
appStoreLink: "https://apps.apple.com/app/blink-bitcoin-wallet/id1531383905", image: "blink")
|
||||
case .blixtwallet:
|
||||
return .init(index: 11, tag: "blixtwallet", displayName: "Blixt Wallet", link: "blixtwallet:lightning:",
|
||||
appStoreLink: "https://testflight.apple.com/join/EXvGhRzS", image: "blixt-wallet")
|
||||
|
||||
@@ -21,16 +21,14 @@ struct TransactionView: View {
|
||||
let formatter = RelativeDateTimeFormatter()
|
||||
let relativeDate = formatter.localizedString(for: created_at, relativeTo: Date.now)
|
||||
let event = decode_nostr_event_json(transaction.description ?? "") ?? transaction.metadata?.nostr
|
||||
let pubkey = self.pubkeyToDisplay(for: event, isIncomingTransaction: isIncomingTransaction)
|
||||
let pubkey = self.pubkeyToDisplay(for: event, isIncomingTransaction: isIncomingTransaction) ?? ANON_PUBKEY
|
||||
|
||||
VStack(alignment: .leading) {
|
||||
HStack(alignment: .center) {
|
||||
ZStack {
|
||||
ProfilePicView(pubkey: pubkey ?? ANON_PUBKEY, size: 45, highlight: .custom(.damusAdaptableBlack, 0.1), profiles: damus_state.profiles, disable_animation: damus_state.settings.disable_animation)
|
||||
ProfilePicView(pubkey: pubkey, size: 45, highlight: .custom(.damusAdaptableBlack, 0.1), profiles: damus_state.profiles, disable_animation: damus_state.settings.disable_animation)
|
||||
.onTapGesture {
|
||||
if let pubkey {
|
||||
damus_state.nav.push(route: Route.ProfileByKey(pubkey: pubkey))
|
||||
}
|
||||
damus_state.nav.push(route: Route.ProfileByKey(pubkey: pubkey))
|
||||
}
|
||||
|
||||
Image(txType)
|
||||
@@ -86,15 +84,17 @@ struct TransactionView: View {
|
||||
}
|
||||
}
|
||||
|
||||
func userDisplayName(pubkey: Pubkey?) -> String {
|
||||
guard let pubkey else {
|
||||
return NSLocalizedString("Unknown", comment: "A name label for an unknown user")
|
||||
}
|
||||
|
||||
func userDisplayName(pubkey: Pubkey) -> String {
|
||||
let profile_txn = damus_state.profiles.lookup(id: pubkey, txn_name: "txview-profile")
|
||||
let profile = profile_txn?.unsafeUnownedValue
|
||||
|
||||
return Profile.displayName(profile: profile, pubkey: pubkey).displayName
|
||||
|
||||
if let display_name = profile?.display_name {
|
||||
return display_name
|
||||
} else if let name = profile?.name {
|
||||
return "@" + name
|
||||
} else {
|
||||
return NSLocalizedString("Unknown", comment: "A name label for an unknown user")
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user