mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-12-23 20:09:23 +00:00
changenow api fixes
This commit is contained in:
parent
1bd6166f2c
commit
d87c9981c6
1 changed files with 7 additions and 3 deletions
|
@ -290,8 +290,8 @@ class ChangeNowAPI {
|
|||
final json = Map<String, dynamic>.from(jsonObject as Map);
|
||||
return ExchangeResponse(
|
||||
value: Range(
|
||||
max: Decimal.tryParse(json["maxAmount"] as String? ?? ""),
|
||||
min: Decimal.tryParse(json["minAmount"] as String? ?? ""),
|
||||
max: Decimal.tryParse(json["maxAmount"]?.toString() ?? ""),
|
||||
min: Decimal.tryParse(json["minAmount"]?.toString() ?? ""),
|
||||
),
|
||||
);
|
||||
} catch (e, s) {
|
||||
|
@ -366,9 +366,13 @@ class ChangeNowAPI {
|
|||
required String toTicker,
|
||||
required Decimal fromAmount,
|
||||
required bool reversed,
|
||||
bool useRateId = true,
|
||||
String? apiKey,
|
||||
}) async {
|
||||
Map<String, dynamic> params = {"api_key": apiKey ?? kChangeNowApiKey};
|
||||
Map<String, dynamic> params = {
|
||||
"api_key": apiKey ?? kChangeNowApiKey,
|
||||
"useRateId": useRateId.toString(),
|
||||
};
|
||||
|
||||
late final Uri uri;
|
||||
if (reversed) {
|
||||
|
|
Loading…
Reference in a new issue