@@ -29,7 +29,6 @@ import '../../providers/providers.dart';
2929import '../../route_generator.dart' ;
3030import '../../services/exchange/change_now/change_now_exchange.dart' ;
3131import '../../services/exchange/exchange.dart' ;
32- import '../../services/exchange/majestic_bank/majestic_bank_exchange.dart' ;
3332import '../../services/exchange/nanswap/nanswap_exchange.dart' ;
3433import '../../services/exchange/simpleswap/simpleswap_exchange.dart' ;
3534import '../../services/exchange/trocador/trocador_exchange.dart' ;
@@ -101,7 +100,7 @@ class _TradeDetailsViewState extends ConsumerState<TradeDetailsView> {
101100 .trades
102101 .firstWhere ((e) => e.tradeId == tradeId);
103102
104- if (mounted) {
103+ if (mounted && trade.exchangeName != "Majestic Bank" ) {
105104 final exchange = Exchange .fromName (trade.exchangeName);
106105 final response = await exchange.updateTrade (trade);
107106
@@ -435,36 +434,6 @@ class _TradeDetailsViewState extends ConsumerState<TradeDetailsView> {
435434 mainAxisAlignment: MainAxisAlignment .spaceBetween,
436435 children: [
437436 Text ("Status" , style: STextStyles .itemSubtitle (context)),
438- if (trade.exchangeName ==
439- MajesticBankExchange .exchangeName &&
440- trade.status == "Completed" )
441- Row (
442- mainAxisSize: MainAxisSize .min,
443- children: [
444- GestureDetector (
445- onTap: () {
446- showDialog <void >(
447- context: context,
448- builder:
449- (context) => const StackOkDialog (
450- title: "Trade Info" ,
451- message:
452- "Majestic Bank does not store order data indefinitely" ,
453- ),
454- );
455- },
456- child: SvgPicture .asset (
457- Assets .svg.circleInfo,
458- height: 20 ,
459- width: 20 ,
460- color:
461- Theme .of (
462- context,
463- ).extension < StackColors > ()! .infoItemIcons,
464- ),
465- ),
466- ],
467- ),
468437 ],
469438 ),
470439 const SizedBox (height: 4 ),
@@ -1202,68 +1171,66 @@ class _TradeDetailsViewState extends ConsumerState<TradeDetailsView> {
12021171 ],
12031172 ),
12041173 ),
1205- isDesktop ? const _Divider () : const SizedBox (height: 12 ),
1206- RoundedWhiteContainer (
1207- padding:
1208- isDesktop
1209- ? const EdgeInsets .all (16 )
1210- : const EdgeInsets .all (12 ),
1211- child: Column (
1212- crossAxisAlignment: CrossAxisAlignment .start,
1213- children: [
1214- Text ("Tracking" , style: STextStyles .itemSubtitle (context)),
1215- const SizedBox (height: 4 ),
1216- Builder (
1217- builder: (context) {
1218- late final String url;
1219- switch (trade.exchangeName) {
1220- case ChangeNowExchange .exchangeName:
1221- url =
1222- "https://changenow.io/exchange/txs/${trade .tradeId }" ;
1223- break ;
1224- case SimpleSwapExchange .exchangeName:
1225- url =
1226- "https://simpleswap.io/exchange?id=${trade .tradeId }" ;
1227- break ;
1228- case MajesticBankExchange .exchangeName:
1229- url =
1230- "https://majesticbank.sc/track?trx=${trade .tradeId }" ;
1231- break ;
1232- case NanswapExchange .exchangeName:
1233- url =
1234- "https://nanswap.com/transaction/${trade .tradeId }" ;
1235- break ;
1236-
1237- default :
1238- if (trade.exchangeName.startsWith (
1239- TrocadorExchange .exchangeName,
1240- )) {
1174+ if (trade.exchangeName != "Majestic Bank" )
1175+ isDesktop ? const _Divider () : const SizedBox (height: 12 ),
1176+ if (trade.exchangeName != "Majestic Bank" )
1177+ RoundedWhiteContainer (
1178+ padding:
1179+ isDesktop
1180+ ? const EdgeInsets .all (16 )
1181+ : const EdgeInsets .all (12 ),
1182+ child: Column (
1183+ crossAxisAlignment: CrossAxisAlignment .start,
1184+ children: [
1185+ Text ("Tracking" , style: STextStyles .itemSubtitle (context)),
1186+ const SizedBox (height: 4 ),
1187+ Builder (
1188+ builder: (context) {
1189+ late final String url;
1190+ switch (trade.exchangeName) {
1191+ case ChangeNowExchange .exchangeName:
12411192 url =
1242- "https://trocador.app/en/checkout/${trade .tradeId }" ;
1243- }
1244- }
1245- return ConditionalParent (
1246- condition: isDesktop,
1247- builder:
1248- (child) => MouseRegion (
1249- cursor: SystemMouseCursors .click,
1250- child: child,
1251- ),
1252- child: GestureDetector (
1253- onTap: () {
1254- launchUrl (
1255- Uri .parse (url),
1256- mode: LaunchMode .externalApplication,
1257- );
1258- },
1259- child: Text (url, style: STextStyles .link2 (context)),
1260- ),
1261- );
1262- },
1263- ),
1264- ],
1193+ "https://changenow.io/exchange/txs/${trade .tradeId }" ;
1194+ break ;
1195+ case SimpleSwapExchange .exchangeName:
1196+ url =
1197+ "https://simpleswap.io/exchange?id=${trade .tradeId }" ;
1198+ break ;
1199+ case NanswapExchange .exchangeName:
1200+ url =
1201+ "https://nanswap.com/transaction/${trade .tradeId }" ;
1202+ break ;
1203+
1204+ default :
1205+ if (trade.exchangeName.startsWith (
1206+ TrocadorExchange .exchangeName,
1207+ )) {
1208+ url =
1209+ "https://trocador.app/en/checkout/${trade .tradeId }" ;
1210+ }
1211+ }
1212+ return ConditionalParent (
1213+ condition: isDesktop,
1214+ builder:
1215+ (child) => MouseRegion (
1216+ cursor: SystemMouseCursors .click,
1217+ child: child,
1218+ ),
1219+ child: GestureDetector (
1220+ onTap: () {
1221+ launchUrl (
1222+ Uri .parse (url),
1223+ mode: LaunchMode .externalApplication,
1224+ );
1225+ },
1226+ child: Text (url, style: STextStyles .link2 (context)),
1227+ ),
1228+ );
1229+ },
1230+ ),
1231+ ],
1232+ ),
12651233 ),
1266- ),
12671234 if (! isDesktop) const SizedBox (height: 12 ),
12681235 if (! isDesktop && showSendFromStackButton)
12691236 SecondaryButton (
0 commit comments