From 4b944a249607ff3e548881a190adaf963970b800 Mon Sep 17 00:00:00 2001
From: sneurlax <sneurlax@gmail.com>
Date: Mon, 23 Jan 2023 10:59:14 -0600
Subject: [PATCH] update API URL, use HTTPS

---
 lib/services/buy/simplex/simplex_api.dart | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/lib/services/buy/simplex/simplex_api.dart b/lib/services/buy/simplex/simplex_api.dart
index 7b9459015..385eb118a 100644
--- a/lib/services/buy/simplex/simplex_api.dart
+++ b/lib/services/buy/simplex/simplex_api.dart
@@ -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}');
       }