mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-19 05:58:50 +02:00
* Add Chainflip exchange provider (#1807) * feat: add Chainflip exchange provider feat: add chainflip provider (fetchLimits and fetchRate) feat: add createTrade feat: add icon feat: add swap status feat: add FLIP to list feat: add to transaction list, with target amount feat: update receivedAmount with real values style: dart formatting feat: update received amount chore: cleanup space and typo * fix: use correct retryDurationInBlocks * feat: use secrets for api key --------- Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com> * Add secrets to workflow * revert boostfee change * minor ui fix [skip ci] --------- Co-authored-by: David Cumps <david@cumps.be>
27 lines
856 B
Dart
27 lines
856 B
Dart
import 'package:cake_wallet/entities/balance_display_mode.dart';
|
|
import 'package:cake_wallet/exchange/trade.dart';
|
|
import 'package:cake_wallet/store/settings_store.dart';
|
|
import 'package:cake_wallet/view_model/dashboard/action_list_item.dart';
|
|
|
|
class TradeListItem extends ActionListItem {
|
|
TradeListItem({
|
|
required this.trade,
|
|
required this.settingsStore,
|
|
required super.key,
|
|
});
|
|
|
|
final Trade trade;
|
|
final SettingsStore settingsStore;
|
|
|
|
BalanceDisplayMode get displayMode => settingsStore.balanceDisplayMode;
|
|
|
|
String get tradeFormattedAmount =>
|
|
displayMode == BalanceDisplayMode.hiddenBalance ? '---' : trade.amountFormatted();
|
|
|
|
String get tradeFormattedReceiveAmount =>
|
|
displayMode == BalanceDisplayMode.hiddenBalance ? '---' : trade.receiveAmountFormatted();
|
|
|
|
@override
|
|
DateTime get date => trade.createdAt!;
|
|
}
|