airswap-web icon indicating copy to clipboard operation
airswap-web copied to clipboard

Feature/555 taker flow

Open coltraneyan opened this issue 2 years ago • 1 comments

Would appreciate some eyes on this.

Done

  1. Have set up to pull FullOrder data from URL and pass down to component + children
  2. Altered stringToSigDecimals function slightly to encompass an edge case

Issues:

  1. SettingsPopover calls AppRouteParams, which only returns "order", not the full URL on language change.

Questions:

  1. Majority of component relies on tokenLists from a connected wallet. I'm thinking a loading spinner + "Please connect wallet" overlay to cover these cases?
  2. does OrderStatus persist in store? Is there a way to know whether an order has been cancelled or taken?
  3. what function will give me a correct txHash for etherscan url?

Branched from 544/maker-flow. Final PR will rebase etc.

coltraneyan avatar Aug 29 '22 01:08 coltraneyan

  1. SettingsPopover calls AppRouteParams, which only returns "order", not the full URL on language change.

AppRouteParams is only for the SwapWidget, should definitely rename that to avoid confusion.

You should just use useParams from react-dom. I will add changes to the make branch to make it work. Then you should just use this to OrderDetailWidget:

To const params = useParams<{ compressedOrder: 'string' }>();

  1. Majority of component relies on tokenLists from a connected wallet. I'm thinking a loading spinner + "Please connect wallet" overlay to cover these cases?

Refer to the Make and Swap widget how to do this.

  1. does OrderStatus persist in store? Is there a way to know whether an order has been cancelled or taken?

Good question. Please ask Don or on the dev meeting tuesday.

  1. what function will give me a correct txHash for etherscan url?

Same! Not sure how to know an order is taken and what the txHash is.

You can still prepare for the canceled / taken scenario's though. So just hardcode it for now for testing.

piersss avatar Aug 29 '22 08:08 piersss

And some warnings in console:

src/components/OrderDetailWidget/OrderDetailWidget.tsx
  Line 85:6:  React Hook useMemo has a missing dependency: 'signerAmount'. Either include it or remove the dependency array  react-hooks/exhaustive-deps
  Line 91:6:  React Hook useMemo has a missing dependency: 'senderAmount'. Either include it or remove the dependency array  react-hooks/exhaustive-deps

piersss avatar Sep 22 '22 19:09 piersss