mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-12-04 12:34:14 +01:00
* thorChain btc to eth swap * eth to btc swap * update the UI * update localization * Update thorchain_exchange.provider.dart * minor fixes * minor fix * fix min amount bug * revert amount_converter changes * fetching thorChain traid info * resolve evm related merge conflicts * minor fix * Fix eth transaction hash for Thorchain Integration * add new status endpoint and refund address for eth * Adjust affiliate fee * Fix conflicts with main * review comments + transaction filter item * taproot addresses check * added 10 outputs check * Update thorchain_exchange.provider.dart * minor fixes * update thorchain title * fix fetching rate for thorchain * Revert "fix fetching rate for thorchain" This reverts commit 3aa1386ecfbca14271bf01a73b424de19c4fd484. * fix thorchain exchange rate --------- Co-authored-by: OmarHatem <omarh.ismail1@gmail.com>
63 lines
1.8 KiB
Dart
63 lines
1.8 KiB
Dart
import 'package:cake_wallet/themes/extensions/sync_indicator_theme.dart';
|
|
import 'package:cake_wallet/themes/extensions/receive_page_theme.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:cake_wallet/palette.dart';
|
|
|
|
class SyncIndicatorIcon extends StatelessWidget {
|
|
SyncIndicatorIcon(
|
|
{this.boolMode = true,
|
|
this.isSynced = false,
|
|
this.value = waiting,
|
|
this.size = 4.0});
|
|
|
|
final bool boolMode;
|
|
final bool isSynced;
|
|
final String value;
|
|
final double size;
|
|
|
|
static const String waiting = 'waiting';
|
|
static const String actionRequired = 'action required';
|
|
static const String created = 'created';
|
|
static const String fetching = 'fetching';
|
|
static const String finished = 'finished';
|
|
static const String success = 'success';
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
Color indicatorColor;
|
|
|
|
if (boolMode) {
|
|
indicatorColor = isSynced
|
|
? PaletteDark.brightGreen
|
|
: Theme.of(context).extension<SyncIndicatorTheme>()!.notSyncedIconColor;
|
|
} else {
|
|
switch (value.toLowerCase()) {
|
|
case waiting:
|
|
indicatorColor = Colors.red;
|
|
break;
|
|
case actionRequired:
|
|
indicatorColor =
|
|
Theme.of(context).extension<ReceivePageTheme>()!.currentTileBackgroundColor;
|
|
break;
|
|
case created:
|
|
indicatorColor = PaletteDark.brightGreen;
|
|
break;
|
|
case fetching:
|
|
indicatorColor = Colors.red;
|
|
break;
|
|
case finished:
|
|
case success:
|
|
indicatorColor = PaletteDark.brightGreen;
|
|
break;
|
|
default:
|
|
indicatorColor = Colors.red;
|
|
}
|
|
}
|
|
return Container(
|
|
height: size,
|
|
width: size,
|
|
decoration:
|
|
BoxDecoration(shape: BoxShape.circle, color: indicatorColor));
|
|
}
|
|
}
|