mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-02-03 03:36:39 +00:00
add null check [skip ci]
This commit is contained in:
parent
35b7c05bc1
commit
f29f17476c
1 changed files with 5 additions and 8 deletions
|
@ -249,15 +249,12 @@ class SideShiftExchangeProvider extends ExchangeProvider {
|
||||||
final expectedSendAmount = responseJSON['depositAmount'].toString();
|
final expectedSendAmount = responseJSON['depositAmount'].toString();
|
||||||
final deposits = responseJSON['deposits'] as List?;
|
final deposits = responseJSON['deposits'] as List?;
|
||||||
TradeState? state;
|
TradeState? state;
|
||||||
|
String? status;
|
||||||
|
|
||||||
if (deposits != null) {
|
if (deposits?.isNotEmpty ?? false) {
|
||||||
if (deposits.isEmpty) {
|
status = deposits![0]['status'] as String;
|
||||||
state = TradeState.deserialize(raw: 'created');
|
|
||||||
} else {
|
|
||||||
final status = deposits[0]['status'] as String;
|
|
||||||
state = TradeState.deserialize(raw: status);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
state = TradeState.deserialize(raw: status ?? 'created');
|
||||||
|
|
||||||
final expiredAtRaw = responseJSON['expiresAtISO'] as String;
|
final expiredAtRaw = responseJSON['expiresAtISO'] as String;
|
||||||
final expiredAt =
|
final expiredAt =
|
||||||
|
|
Loading…
Reference in a new issue