Skip to content

Commit

Permalink
Merge pull request #1195 from bonomat/chore/add-logs-of-how-much-sync
Browse files Browse the repository at this point in the history
fix: invalid commitment signed
  • Loading branch information
bonomat authored Aug 30, 2023
2 parents 56461b1 + fc9ea11 commit fcd7431
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions mobile/lib/features/trade/application/order_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ class OrderService {
direction: direction.toApi(),
orderType: const rust.OrderType.market());

// The problem here is that we have a concurrency issue when sending a payment and trying to open/close a position.
// The sleep here tries to ensure that we do not process the order matching fee payment from an older order while triggering the next order.
// This does not fix the underlying issue though: we should block in the protocol that a payment cannot be sent or received at the same time as a subchannel is being added or removed.
await Future.delayed(const Duration(seconds: 5));

return await rust.api.submitOrder(order: order);
}

Expand Down

0 comments on commit fcd7431

Please sign in to comment.