mb order status util and extra logging

This commit is contained in:
julian 2023-03-03 14:46:53 -06:00
parent 58227c40be
commit 40ca565d54
2 changed files with 17 additions and 6 deletions

View file

@ -24,9 +24,18 @@ class MBOrderStatus extends MBObject {
final Decimal received;
final Decimal confirmed;
Map<String, dynamic> toMap() => {
"orderId": orderId,
"status": status,
"fromCurrency": fromCurrency,
"fromAmount": fromAmount,
"receiveCurrency": receiveCurrency,
"receiveAmount": receiveAmount,
"address": address,
"received": received,
"confirmed": confirmed,
};
@override
String toString() {
// todo: full toString
return status;
}
String toString() => toMap().toString();
}

View file

@ -349,8 +349,10 @@ class MajesticBankAPI {
return ExchangeResponse(value: status);
} catch (e, s) {
Logging.instance
.log("createOrder exception: $e\n$s", level: LogLevel.Error);
Logging.instance.log(
"trackOrder exception when trying to parse $json: $e\n$s",
level: LogLevel.Error,
);
return ExchangeResponse(
exception: ExchangeException(
e.toString(),