Merge branch 'main' of https://github.com/cake-tech/cake_wallet into CW-271-fixed-rate-incorrect-amount

This commit is contained in:
OmarHatem 2022-12-06 17:33:08 +02:00
commit e65bd87f06

View file

@ -249,11 +249,12 @@ class SideShiftExchangeProvider extends ExchangeProvider {
final expectedSendAmount = responseJSON['depositAmount'].toString();
final deposits = responseJSON['deposits'] as List?;
TradeState? state;
String? status;
if (deposits != null && deposits.isNotEmpty) {
final status = deposits[0]['status'] as String;
state = TradeState.deserialize(raw: status);
if (deposits?.isNotEmpty ?? false) {
status = deposits![0]['status'] as String?;
}
state = TradeState.deserialize(raw: status ?? 'created');
final expiredAtRaw = responseJSON['expiresAtISO'] as String;
final expiredAt =