mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-01-09 20:39:35 +00:00
Fix SimpleSwap create exchange (#522)
* Check for status code 201 instead of 200 to follow SimpleSwap API documentation * allow 200 and 201 success status code
This commit is contained in:
parent
c921ad890a
commit
6b8e749abf
1 changed files with 1 additions and 1 deletions
|
@ -91,7 +91,7 @@ class SimpleSwapExchangeProvider extends ExchangeProvider {
|
|||
|
||||
final response = await post(uri, headers: headers, body: json.encode(body));
|
||||
|
||||
if (response.statusCode != 200) {
|
||||
if (response.statusCode != 200 && response.statusCode != 201) {
|
||||
if (response.statusCode == 400) {
|
||||
final responseJSON = json.decode(response.body) as Map<String, dynamic>;
|
||||
final error = responseJSON['message'] as String;
|
||||
|
|
Loading…
Reference in a new issue