@@ -31,44 +31,54 @@ struct ActivityIcon: View {
3131 }
3232
3333 var body : some View {
34- if isLightning {
35- if status == . failed {
34+ Group {
35+ if isLightning {
36+ if status == . failed {
37+ CircularIcon (
38+ icon: " x-circle " ,
39+ iconColor: . purpleAccent,
40+ backgroundColor: . purple16,
41+ size: size
42+ )
43+ } else if status == . pending {
44+ CircularIcon (
45+ icon: " hourglass-simple " ,
46+ iconColor: . purpleAccent,
47+ backgroundColor: . purple16,
48+ size: size
49+ )
50+ } else {
51+ CircularIcon (
52+ icon: txType == . sent ? " arrow-up " : " arrow-down " ,
53+ iconColor: . purpleAccent,
54+ backgroundColor: . purple16,
55+ size: size
56+ )
57+ }
58+ } else if isBoosted && !( confirmed ?? false ) {
3659 CircularIcon (
37- icon: " x-circle " ,
38- iconColor: . purpleAccent,
39- backgroundColor: . purple16,
40- size: size
41- )
42- } else if status == . pending {
43- CircularIcon (
44- icon: " hourglass-simple " ,
45- iconColor: . purpleAccent,
46- backgroundColor: . purple16,
60+ icon: " timer-alt " ,
61+ iconColor: . yellow,
62+ backgroundColor: . yellow16,
4763 size: size
4864 )
4965 } else {
66+ let paymentIcon = txType == PaymentType . sent ? " arrow-up " : " arrow-down "
5067 CircularIcon (
51- icon: txType == . sent ? " arrow-up " : " arrow-down " ,
52- iconColor: . purpleAccent ,
53- backgroundColor: . purple16 ,
68+ icon: isTransfer ? " arrow-up-down " : paymentIcon ,
69+ iconColor: . brandAccent ,
70+ backgroundColor: . brand16 ,
5471 size: size
5572 )
5673 }
57- } else if isBoosted && !( confirmed ?? false ) {
58- CircularIcon (
59- icon: " timer-alt " ,
60- iconColor: . yellow,
61- backgroundColor: . yellow16,
62- size: size
63- )
64- } else {
65- let paymentIcon = txType == PaymentType . sent ? " arrow-up " : " arrow-down "
66- CircularIcon (
67- icon: isTransfer ? " arrow-up-down " : paymentIcon,
68- iconColor: . brandAccent,
69- backgroundColor: . brand16,
70- size: size
71- )
7274 }
75+ . accessibilityIdentifierIfPresent ( iconAccessibilityIdentifier)
76+ }
77+
78+ private var iconAccessibilityIdentifier : String ? {
79+ if !isLightning, isBoosted, !( confirmed ?? false ) {
80+ return " BoostingIcon "
81+ }
82+ return nil
7383 }
7484}
0 commit comments