optimized code

This commit is contained in:
Tanner Silva 2021-02-08 18:31:47 -06:00
parent 1f401421ea
commit c05c2e7c29

View file

@ -91,12 +91,14 @@ abstract class TradeDetailsViewModelBase with Store {
value: trade.provider.toString()));
}
if (trade.provider.title == "ChangeNOW") {
if (trade.provider is ChangeNowExchangeProvider) {
final buildURL =
'https://changenow.io/exchange/txs/${trade.id.toString()}';
items.add(TrackTradeListItem(
title: "Track",
value: "https://changenow.io/exchange/txs/${trade.id.toString()}",
title: 'Track',
value: buildURL,
onTap: () {
launch("https://changenow.io/exchange/txs/${trade.id.toString()}");
launch(buildURL);
}));
}