mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-02-02 03:06:29 +00:00
update API URL, use HTTPS
This commit is contained in:
parent
f205312bb9
commit
4b944a2496
1 changed files with 6 additions and 5 deletions
|
@ -90,7 +90,8 @@ class SimplexAPI {
|
|||
Map<String, String> headers = {
|
||||
'Content-Type': 'application/x-www-form-urlencoded',
|
||||
};
|
||||
Uri url = Uri.parse('http://localhost/api.php?ROUTE=supported_fiats');
|
||||
Uri url = Uri.parse(
|
||||
'https://simplex-sandbox.stackwallet.com/api.php?ROUTE=supported_fiats');
|
||||
|
||||
var res = await http.post(url, headers: headers);
|
||||
if (res.statusCode != 200) {
|
||||
|
@ -158,10 +159,10 @@ class SimplexAPI {
|
|||
: "${quote.youReceiveCryptoAmount}",
|
||||
};
|
||||
// TODO add USER_ID
|
||||
Uri url = Uri.http('localhost', 'api.php', data);
|
||||
Uri url = Uri.https('simplex-sandbox.stackwallet.com', 'api.php', data);
|
||||
// TODO update to stackwallet.com hosted API and use HTTPS
|
||||
|
||||
var res = await http.post(url, headers: headers, body: json.encode(data));
|
||||
var res = await http.get(url, headers: headers);
|
||||
if (res.statusCode != 200) {
|
||||
throw Exception('getQuote exception: statusCode= ${res.statusCode}');
|
||||
}
|
||||
|
@ -229,9 +230,9 @@ class SimplexAPI {
|
|||
};
|
||||
// TODO add USER_ID
|
||||
|
||||
Uri url = Uri.http('localhost', 'api.php', data);
|
||||
Uri url = Uri.https('simplex-sandbox.stackwallet.com', 'api.php', data);
|
||||
// TODO update to stackwallet.com hosted API and use HTTPS
|
||||
var res = await http.post(url, headers: headers, body: json.encode(data));
|
||||
var res = await http.get(url, headers: headers);
|
||||
if (res.statusCode != 200) {
|
||||
throw Exception('newOrder exception: statusCode= ${res.statusCode}');
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue