mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-11-17 01:37:40 +00:00
Fix calling wrong path
This commit is contained in:
parent
29e9bb2181
commit
60f47e5e9f
1 changed files with 7 additions and 6 deletions
|
@ -290,22 +290,23 @@ class TrocadorExchangeProvider extends ExchangeProvider {
|
|||
}
|
||||
}
|
||||
|
||||
Future<Uri> _getUri(String createTradePath, Map<String, String> queryParams) async {
|
||||
Future<Uri> _getUri(String path, Map<String, String> queryParams) async {
|
||||
if (!supportsOnionAddress) {
|
||||
return Uri.https(clearNetAuthority, tradePath, queryParams);
|
||||
return Uri.https(clearNetAuthority, path, queryParams);
|
||||
}
|
||||
|
||||
final uri = Uri.http(onionApiAuthority, path, queryParams);
|
||||
|
||||
if (useTorOnly) {
|
||||
return Uri.http(onionApiAuthority, tradePath, queryParams);
|
||||
return uri;
|
||||
}
|
||||
|
||||
try {
|
||||
final uri = Uri.http(onionApiAuthority, tradePath);
|
||||
await get(uri);
|
||||
|
||||
return Uri.http(onionApiAuthority, tradePath, queryParams);
|
||||
return uri;
|
||||
} catch (e) {
|
||||
return Uri.https(clearNetAuthority, tradePath, queryParams);
|
||||
return Uri.https(clearNetAuthority, path, queryParams);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue