Whatever.

This commit is contained in:
M 2021-03-22 19:38:55 +02:00
parent b20246ad89
commit 23f73df391
3 changed files with 18 additions and 12 deletions

View file

@ -4,7 +4,7 @@ import 'package:cake_wallet/exchange/trade_state.dart';
import 'package:http/http.dart'; import 'package:http/http.dart';
Future<Order> findOrderById(String id) async { Future<Order> findOrderById(String id) async {
final orderUrl = 'https://api.testwyre.com/v3/orders/' + id; final orderUrl = 'https://api.sendwyre.com/v3/orders/' + id;
final orderResponse = await get(orderUrl); final orderResponse = await get(orderUrl);
@ -20,7 +20,7 @@ Future<Order> findOrderById(String id) async {
DateTime.fromMillisecondsSinceEpoch(createdAtRaw).toLocal(); DateTime.fromMillisecondsSinceEpoch(createdAtRaw).toLocal();
final transferUrl = final transferUrl =
'https://api.testwyre.com/v2/transfer/' + transferId + '/track'; 'https://api.sendwyre.com/v2/transfer/' + transferId + '/track';
final transferResponse = await get(transferUrl); final transferResponse = await get(transferUrl);

View file

@ -144,19 +144,25 @@ class DashboardPage extends BasePage {
onClick: walletViewModel.isRunningWebView onClick: walletViewModel.isRunningWebView
? null ? null
: () async { : () async {
walletViewModel.isRunningWebView = true; try {
final url = await walletViewModel.getWyreUrl(); walletViewModel.isRunningWebView = true;
if (url.isNotEmpty) { final url = await walletViewModel.getWyreUrl();
await Navigator.of(context) if (url.isNotEmpty) {
.pushNamed(Routes.wyre, arguments: url); await Navigator.of(context)
.pushNamed(Routes.wyre, arguments: url);
final orderId = walletViewModel.ordersStore.orderId; final orderId = walletViewModel.ordersStore
.orderId;
if (orderId.isNotEmpty) { if (orderId.isNotEmpty) {
await walletViewModel.saveOrder(orderId); await walletViewModel.saveOrder(orderId);
}
} }
walletViewModel.isRunningWebView = false;
} catch(e) {
print(e.toString());
walletViewModel.isRunningWebView = false;
} }
walletViewModel.isRunningWebView = false;
}) })
], ],
)), )),

View file

@ -52,7 +52,7 @@ abstract class OrderDetailsViewModelBase with Store {
void _updateItems() { void _updateItems() {
final dateFormat = DateFormatter.withCurrentLocal(); final dateFormat = DateFormatter.withCurrentLocal();
final buildURL = final buildURL =
'https://dashboard-test.testwyre.com/track/${order.transferId}'; 'https://api.sendwyre.com/v2/transfer/${order.transferId}/track';
items?.clear(); items?.clear();