mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-05-04 12:32:21 +00:00
fix null check
This commit is contained in:
parent
fa91ccfdbf
commit
35b7c05bc1
1 changed files with 8 additions and 6 deletions
|
@ -249,12 +249,14 @@ 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;
|
||||||
|
|
||||||
if (deposits != null && deposits.isEmpty) {
|
if (deposits != null) {
|
||||||
state = TradeState.deserialize(raw: 'created');
|
if (deposits.isEmpty) {
|
||||||
} else {
|
state = TradeState.deserialize(raw: 'created');
|
||||||
final status = deposits?[0]['status'] as String;
|
} else {
|
||||||
state = TradeState.deserialize(raw: status);
|
final status = deposits[0]['status'] as String;
|
||||||
|
state = TradeState.deserialize(raw: status);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
final expiredAtRaw = responseJSON['expiresAtISO'] as String;
|
final expiredAtRaw = responseJSON['expiresAtISO'] as String;
|
||||||
|
|
Loading…
Reference in a new issue