mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-06-28 20:39:51 +00: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 3aa1386ecf
.
* fix thorchain exchange rate
---------
Co-authored-by: OmarHatem <omarh.ismail1@gmail.com>
74 lines
2.8 KiB
Dart
74 lines
2.8 KiB
Dart
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:cw_core/crypto_currency.dart';
|
|
import 'package:cake_wallet/exchange/exchange_provider_description.dart';
|
|
import 'package:cake_wallet/themes/extensions/dashboard_page_theme.dart';
|
|
|
|
class TradeRow extends StatelessWidget {
|
|
TradeRow({
|
|
required this.provider,
|
|
required this.from,
|
|
required this.to,
|
|
required this.createdAtFormattedDate,
|
|
this.onTap,
|
|
this.formattedAmount,
|
|
});
|
|
|
|
final VoidCallback? onTap;
|
|
final ExchangeProviderDescription provider;
|
|
final CryptoCurrency from;
|
|
final CryptoCurrency to;
|
|
final String? createdAtFormattedDate;
|
|
final String? formattedAmount;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final amountCrypto = from.toString();
|
|
|
|
return InkWell(
|
|
onTap: onTap,
|
|
child: Container(
|
|
padding: EdgeInsets.fromLTRB(24, 8, 24, 8),
|
|
color: Colors.transparent,
|
|
child: Row(
|
|
mainAxisSize: MainAxisSize.max,
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
children: [
|
|
ClipRRect(
|
|
borderRadius: BorderRadius.circular(50),
|
|
child: Image.asset(provider.image, width: 36, height: 36)),
|
|
SizedBox(width: 12),
|
|
Expanded(
|
|
child: Column(
|
|
mainAxisSize: MainAxisSize.min,
|
|
children: [
|
|
Row(mainAxisAlignment: MainAxisAlignment.spaceBetween, children: <Widget>[
|
|
Text('${from.toString()} → ${to.toString()}',
|
|
style: TextStyle(
|
|
fontSize: 16,
|
|
fontWeight: FontWeight.w500,
|
|
color: Theme.of(context).extension<DashboardPageTheme>()!.textColor)),
|
|
formattedAmount != null
|
|
? Text(formattedAmount! + ' ' + amountCrypto,
|
|
style: TextStyle(
|
|
fontSize: 16,
|
|
fontWeight: FontWeight.w500,
|
|
color:
|
|
Theme.of(context).extension<DashboardPageTheme>()!.textColor))
|
|
: Container()
|
|
]),
|
|
SizedBox(height: 5),
|
|
Row(mainAxisAlignment: MainAxisAlignment.spaceBetween, children: <Widget>[
|
|
if (createdAtFormattedDate != null)
|
|
Text(createdAtFormattedDate!,
|
|
style: TextStyle(
|
|
fontSize: 14,
|
|
color: Theme.of(context).extension<CakeTextTheme>()!.dateSectionRowColor))
|
|
])
|
|
],
|
|
))
|
|
],
|
|
),
|
|
));
|
|
}
|
|
}
|