mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-11-17 09:47:37 +00:00
mb order status util and extra logging
This commit is contained in:
parent
58227c40be
commit
40ca565d54
2 changed files with 17 additions and 6 deletions
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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(),
|
||||
|
|
Loading…
Reference in a new issue