Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,23 @@ class WordTableItem extends ConsumerWidget {
textAlign: TextAlign.center,
style: isDesktop
? STextStyles.desktopTextExtraSmall(context).copyWith(
color:
Theme.of(context).extension<StackColors>()!.textDark,
color: selectedWord == word
? Theme.of(context)
.extension<StackColors>()!
.textSelectedWordTableItem
: Theme.of(context)
.extension<StackColors>()!
.textDark,
)
: STextStyles.baseXS(context),
: STextStyles.baseXS(context).copyWith(
color: selectedWord == word
? Theme.of(context)
.extension<StackColors>()!
.textSelectedWordTableItem
: Theme.of(context)
.extension<StackColors>()!
.textDark,
),
),
],
),
Expand Down
16 changes: 13 additions & 3 deletions lib/services/coins/namecoin/namecoin_wallet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2443,7 +2443,11 @@ class NamecoinWallet extends CoinServiceAPI {

for (final out in tx["vout"] as List) {
if (prevOut == out["n"]) {
final address = out["scriptPubKey"]["addresses"][0] as String?;
String? address = out["scriptPubKey"]["address"] as String?;
if (address == null && out["scriptPubKey"]["addresses"] != null) {
address = out["scriptPubKey"]["addresses"][0] as String?;
}

if (address != null) {
sendersArray.add(address);
}
Expand All @@ -2454,7 +2458,10 @@ class NamecoinWallet extends CoinServiceAPI {
Logging.instance.log("sendersArray: $sendersArray", level: LogLevel.Info);

for (final output in txObject["vout"] as List) {
final address = output["scriptPubKey"]["addresses"][0] as String?;
String? address = output["scriptPubKey"]["address"] as String?;
if (address == null && output["scriptPubKey"]["addresses"] != null) {
address = output["scriptPubKey"]["addresses"][0] as String?;
}
if (address != null) {
recipientsArray.add(address);
}
Expand Down Expand Up @@ -2519,7 +2526,10 @@ class NamecoinWallet extends CoinServiceAPI {

// add up received tx value
for (final output in txObject["vout"] as List) {
final address = output["scriptPubKey"]["addresses"][0];
String? address = output["scriptPubKey"]["address"] as String?;
if (address == null && output["scriptPubKey"]["addresses"] != null) {
address = output["scriptPubKey"]["addresses"][0] as String?;
}
if (address != null) {
final value = (Decimal.parse(output["value"].toString()) *
Decimal.fromInt(Constants.satsPerCoin))
Expand Down
1 change: 1 addition & 0 deletions lib/utilities/theme/color_theme.dart
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ abstract class StackColorTheme {
Color get loadingOverlayTextColor;
Color get myStackContactIconBG;
Color get textConfirmTotalAmount;
Color get textSelectedWordTableItem;
}

class CoinThemeColor {
Expand Down
2 changes: 2 additions & 0 deletions lib/utilities/theme/dark_colors.dart
Original file line number Diff line number Diff line change
Expand Up @@ -301,4 +301,6 @@ class DarkColors extends StackColorTheme {
Color get myStackContactIconBG => const Color(0x88747778);
@override
Color get textConfirmTotalAmount => const Color(0xFF003921);
@override
Color get textSelectedWordTableItem => const Color(0xFF00297A);
}
2 changes: 2 additions & 0 deletions lib/utilities/theme/light_colors.dart
Original file line number Diff line number Diff line change
Expand Up @@ -301,4 +301,6 @@ class LightColors extends StackColorTheme {
Color get myStackContactIconBG => textFieldDefaultBG;
@override
Color get textConfirmTotalAmount => const Color(0xFF232323);
@override
Color get textSelectedWordTableItem => const Color(0xFF232323);
}
11 changes: 11 additions & 0 deletions lib/utilities/theme/stack_colors.dart
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ class StackColors extends ThemeExtension<StackColors> {
final Color loadingOverlayTextColor;
final Color myStackContactIconBG;
final Color textConfirmTotalAmount;
final Color textSelectedWordTableItem;

StackColors({
required this.themeType,
Expand Down Expand Up @@ -300,6 +301,7 @@ class StackColors extends ThemeExtension<StackColors> {
required this.loadingOverlayTextColor,
required this.myStackContactIconBG,
required this.textConfirmTotalAmount,
required this.textSelectedWordTableItem,
});

factory StackColors.fromStackColorTheme(StackColorTheme colorTheme) {
Expand Down Expand Up @@ -435,6 +437,7 @@ class StackColors extends ThemeExtension<StackColors> {
loadingOverlayTextColor: colorTheme.loadingOverlayTextColor,
myStackContactIconBG: colorTheme.myStackContactIconBG,
textConfirmTotalAmount: colorTheme.textConfirmTotalAmount,
textSelectedWordTableItem: colorTheme.textSelectedWordTableItem,
);
}

Expand Down Expand Up @@ -569,6 +572,7 @@ class StackColors extends ThemeExtension<StackColors> {
Color? loadingOverlayTextColor,
Color? myStackContactIconBG,
Color? textConfirmTotalAmount,
Color? textSelectedWordTableItem,
}) {
return StackColors(
themeType: themeType ?? this.themeType,
Expand Down Expand Up @@ -736,6 +740,8 @@ class StackColors extends ThemeExtension<StackColors> {
myStackContactIconBG: myStackContactIconBG ?? this.myStackContactIconBG,
textConfirmTotalAmount:
textConfirmTotalAmount ?? this.textConfirmTotalAmount,
textSelectedWordTableItem:
textSelectedWordTableItem ?? this.textSelectedWordTableItem,
);
}

Expand Down Expand Up @@ -1388,6 +1394,11 @@ class StackColors extends ThemeExtension<StackColors> {
other.textConfirmTotalAmount,
t,
)!,
textSelectedWordTableItem: Color.lerp(
textSelectedWordTableItem,
other.textSelectedWordTableItem,
t,
)!,
);
}

Expand Down