cake_wallet/lib/exchange/trade_not_found_exeption.dart

21 lines
582 B
Dart
Raw Normal View History

2020-09-21 11:50:26 +00:00
import 'package:cake_wallet/exchange/exchange_provider_description.dart';
2020-01-04 19:31:52 +00:00
import 'package:cake_wallet/generated/i18n.dart';
class TradeNotFoundException implements Exception {
2020-01-08 12:26:34 +00:00
TradeNotFoundException(this.tradeId, {this.provider, this.description = ''});
2022-10-12 17:09:57 +00:00
String? tradeId;
ExchangeProviderDescription? provider;
2020-01-04 19:31:52 +00:00
String description;
@override
String toString() {
var text = tradeId != null && provider != null
2022-10-12 17:09:57 +00:00
? S.current.trade_id_not_found(tradeId!, provider!.title)
2020-01-04 19:31:52 +00:00
: S.current.trade_not_found;
text += ' $description';
return text;
}
}