This feature is still work-in-progress, and deliberately skips implementation of the following:
Allowance approvals
Allowance approval resets (for USDT)
Input validation
Error handling
Actually handling placing an order in the UI
Pretty much everything required to successfully submit a limit order.
Includes the following:
Adds a new redux slice limitOrderSlice for managing limit order submission and allowance approvals
Actually implements signing of limit orders, and submits them to the cowswap API
Fully wires up the limit order input and quote to the confirmation UI for signing
Updates the limit order UI routes with a placeholder allowance approval route
Bumps @cowprotocol/app-data from 1.1.0-RC.0 to 2.3.0
Centralizes cowswap types in the @shapeshiftoss/types package, based on @cowprotocol/cow-sdk, and deletes the near-duplicate types in packages/swapper/src/swappers/CowSwapper/types.ts and src/state/apis/limit-orders/types.ts
Issue (if applicable)
closes #6200
Risk
High Risk PRs Require 2 approvals
High risk. This PR makes changes to the types in cow swapper, so could result in broken trades for cowswap. Realistically the changes are low risk as the only affect typings, but we have to treat this as though it could impact trades.
What protocols, transaction types, wallets or contract interactions might be affected by this PR?
CoW swap.
Testing
Detailed testing of cowswap trades
Sanity check of trades using other swappers
Limit orders are still work-in-progress, so proper testing of them isn't really possible. Quick sanity check of the actual changes made would be handy though.
Engineering
Operations
[ ] :checkered_flag: My feature is behind a flag and doesn't require operations testing (yet)
Description
Implements signing of limit orders.
This feature is still work-in-progress, and deliberately skips implementation of the following:
Includes the following:
limitOrderSlice
for managing limit order submission and allowance approvals@cowprotocol/app-data
from 1.1.0-RC.0 to 2.3.0@shapeshiftoss/types
package, based on@cowprotocol/cow-sdk
, and deletes the near-duplicate types inpackages/swapper/src/swappers/CowSwapper/types.ts
andsrc/state/apis/limit-orders/types.ts
Issue (if applicable)
closes #6200
Risk
High risk. This PR makes changes to the types in cow swapper, so could result in broken trades for cowswap. Realistically the changes are low risk as the only affect typings, but we have to treat this as though it could impact trades.
CoW swap.
Testing
Engineering
Operations
Screenshots (if applicable)
Successful cowswap trade with allowance approval https://jam.dev/c/a089fd18-aa78-4060-aca9-37cefe2f0d66