mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-01-11 05:04:35 +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);
|
final json = Map<String, dynamic>.from(jsonObject as Map);
|
||||||
return ExchangeResponse(
|
return ExchangeResponse(
|
||||||
value: Range(
|
value: Range(
|
||||||
max: Decimal.tryParse(json["maxAmount"] as String? ?? ""),
|
max: Decimal.tryParse(json["maxAmount"]?.toString() ?? ""),
|
||||||
min: Decimal.tryParse(json["minAmount"] as String? ?? ""),
|
min: Decimal.tryParse(json["minAmount"]?.toString() ?? ""),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
} catch (e, s) {
|
} catch (e, s) {
|
||||||
|
@ -366,9 +366,13 @@ class ChangeNowAPI {
|
||||||
required String toTicker,
|
required String toTicker,
|
||||||
required Decimal fromAmount,
|
required Decimal fromAmount,
|
||||||
required bool reversed,
|
required bool reversed,
|
||||||
|
bool useRateId = true,
|
||||||
String? apiKey,
|
String? apiKey,
|
||||||
}) async {
|
}) async {
|
||||||
Map<String, dynamic> params = {"api_key": apiKey ?? kChangeNowApiKey};
|
Map<String, dynamic> params = {
|
||||||
|
"api_key": apiKey ?? kChangeNowApiKey,
|
||||||
|
"useRateId": useRateId.toString(),
|
||||||
|
};
|
||||||
|
|
||||||
late final Uri uri;
|
late final Uri uri;
|
||||||
if (reversed) {
|
if (reversed) {
|
||||||
|
|
Loading…
Reference in a new issue