airswap-web
airswap-web copied to clipboard
Feature/555 taker flow
Would appreciate some eyes on this.
Done
- Have set up to pull FullOrder data from URL and pass down to component + children
- Altered stringToSigDecimals function slightly to encompass an edge case
Issues:
- SettingsPopover calls AppRouteParams, which only returns "order", not the full URL on language change.
Questions:
- Majority of component relies on tokenLists from a connected wallet. I'm thinking a loading spinner + "Please connect wallet" overlay to cover these cases?
- does OrderStatus persist in store? Is there a way to know whether an order has been cancelled or taken?
- what function will give me a correct txHash for etherscan url?
Branched from 544/maker-flow. Final PR will rebase etc.
- 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' }>();
- 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.
- 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.
- 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.
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