mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-11-17 09:47:35 +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 deposits = responseJSON['deposits'] as List?;
|
||||
TradeState? state;
|
||||
|
||||
if (deposits != null && deposits.isEmpty) {
|
||||
state = TradeState.deserialize(raw: 'created');
|
||||
} else {
|
||||
final status = deposits?[0]['status'] as String;
|
||||
state = TradeState.deserialize(raw: status);
|
||||
|
||||
if (deposits != null) {
|
||||
if (deposits.isEmpty) {
|
||||
state = TradeState.deserialize(raw: 'created');
|
||||
} else {
|
||||
final status = deposits[0]['status'] as String;
|
||||
state = TradeState.deserialize(raw: status);
|
||||
}
|
||||
}
|
||||
|
||||
final expiredAtRaw = responseJSON['expiresAtISO'] as String;
|
||||
|
|
Loading…
Reference in a new issue