Minor fixes: fixed scanning of btc uri; fixed display of confirm button on exchange trade screen./

M committed Dec 15, 2020 at 21:40 UTC 2060edc8eef3b00bed7b2620cb216339b88530eb
3 files changed +7 -8
lib/src/screens/exchange_trade/exchange_trade_page.dart
+2 -4
@@ -227,7 +227,7 @@ class ExchangeTradeState extends State<ExchangeTradeForm> {
227 final sendingState =
228 widget.exchangeTradeViewModel.sendViewModel.state;
229
230 - return trade.from == CryptoCurrency.xmr &&
230 + return widget.exchangeTradeViewModel.isSendable &&
231 !(sendingState is TransactionCommitted)
232 ? LoadingPrimaryButton(
233 isDisabled: trade.inputAddress == null ||
@@ -235,9 +235,7 @@ class ExchangeTradeState extends State<ExchangeTradeForm> {
235 isLoading: sendingState is IsExecutingState,
236 onPressed: () =>
237 widget.exchangeTradeViewModel.confirmSending(),
238 - text: trade.provider == ExchangeProviderDescription.xmrto
239 - ? S.of(context).confirm
240 - : S.of(context).send_xmr,
238 + text: S.of(context).confirm,
239 color: Theme.of(context).accentTextTheme.body2.color,
240 textColor: Colors.white)
241 : Offstage();
lib/src/screens/send/send_page.dart
+3 -3
@@ -133,7 +133,8 @@ class SendPage extends BasePage {
133
134 if (uri != null) {
135 address = uri.path;
136 - amount = uri.queryParameters['tx_amount'];
136 + amount = uri.queryParameters['tx_amount'] ??
137 + uri.queryParameters['amount'];
138 } else {
139 address = uri.toString();
140 }
@@ -750,8 +751,7 @@ class SendPage extends BasePage {
751 }
752
753 Future<void> _setTransactionPriority(BuildContext context) async {
753 - final items =
754 - TransactionPriority.forWalletType(sendViewModel.walletType);
754 + final items = TransactionPriority.forWalletType(sendViewModel.walletType);
755 final selectedItem = items.indexOf(sendViewModel.transactionPriority);
756
757 await showPopUp<void>(
lib/src/screens/send/send_template_page.dart
+2 -1
@@ -113,7 +113,8 @@ class SendTemplatePage extends BasePage {
113
114 if (uri != null) {
115 address = uri.path;
116 - amount = uri.queryParameters['tx_amount'];
116 + amount = uri.queryParameters['tx_amount'] ??
117 + uri.queryParameters['amount'];
118 } else {
119 address = uri.toString();
120 }