web
web copied to clipboard
DeFi UI abstraction improvements
Overview
⚠️ Blocked by Idle Finance and Fox Farming milestones, don't start work on this until the two are merged in develop:
https://github.com/orgs/shapeshift/projects/8/views/44 https://github.com/orgs/shapeshift/projects/8/views/51
This issue is to tackle all the issues spotted while reviewing PRs copying the DeFi UI abstraction over:
-
onNext
in XYZApproveProps should have a parameter named other thanarg
:
https://github.com/shapeshift/web/blob/c8daa684f50e5c8cb45bbe5c3e36bdd283481192/src/features/defi/providers/fox-farming/components/FoxFarmingManager/Deposit/components/Approve.tsx#L24-L26
- We should be able to have more accurate path matching when in the context of a known opportunity, see:
https://github.com/shapeshift/web/blob/c8daa684f50e5c8cb45bbe5c3e36bdd283481192/src/features/defi/providers/fox-farming/components/FoxFarmingManager/Overview/FoxFarmingDetails.tsx#L25-L28
-
Fox LP / farming utils/const should move out of Fox Page and to a more generic/defi-namespaced domain now that they are consumed in more places.
-
useAppSelector(gs => selector(gs, ...args)
should have its callback take a parameter namedstate
e.guseAppSelector(state => selector(state, ...args)
:
https://github.com/shapeshift/web/blob/62dee529d0c4fc7486c7cfc07efcb33c403288ad/src/features/defi/providers/idle/components/IdleManager/Claim/components/Status.tsx#L65
-
confirmedTransaction
should be renamed totransaction
since it isn't necessarily confirmed e.g can be pending:
https://github.com/shapeshift/web/blob/62dee529d0c4fc7486c7cfc07efcb33c403288ad/src/features/defi/providers/idle/components/IdleManager/Deposit/components/Status.tsx#L62
-
assetNamespace
should be part of the query:
https://github.com/shapeshift/web/blob/62dee529d0c4fc7486c7cfc07efcb33c403288ad/src/features/defi/providers/idle/components/IdleManager/Claim/IdleClaim.tsx#L38
- destructure
...rest
props directly at component-definition level:
https://github.com/shapeshift/web/blob/9a7c5095caf25fa2cdb4ef46a30013a42e98566e/src/features/defi/providers/foxy/components/FoxyManager/Overview/WithdrawCard.tsx#L25
- Missing translations e.g
https://github.com/shapeshift/web/pull/2344#discussion_r941588029
- Add exact allowance grant support
References and additional details
https://github.com/shapeshift/web/pull/2116
Acceptance Criteria
- All issues are tackled in a consistent manner over all DeFi opportunities copying the DeFi UI abstraction over
Need By Date
No response
Screenshots/Mockups
No response
Estimated effort
No response