Open luziusmeisser opened 1 month ago
UI Development under progress branch: samclassix-develop-positions-view-ui samclassix-develop-positions-view-ui
branch: samclassix-develop-positions-view-ui commit: 8dd831b5e48912d7e9c670e7fb25ea6a0f14bba3 8dd831b5e48912d7e9c670e7fb25ea6a0f14bba3
before:
"viem": "^1.19.15",
"wagmi": "^1.4.12"
after:
"viem": "^2.13.3",
"wagmi": "^2.9.8"
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
[ ] always define chainId and config if you interact with wagmi v2. Take from app.config.ts -> WAGMI_CHAIN.id
Also found in different components while testing. State does not update after approving and btn for approving still active, next step guarded by old state.
Click on btn will create a tx with max spendable about. Is this wanted like this?
Positions UI Proposal
UI Development under progress branch: samclassix-develop-positions-view-ui samclassix-develop-positions-view-ui
We should discuss this on Tuesday at the jour fixe in person. Having the UI react differently just based on a filter seem not very intuitive. Filters should not change how items behave. We need completely distinct views with different values in the table tailored towards the three use cases: own positions, borrow, observatory. Also, clicking a position should yield a consistent result, but we can always change the button label depending on the view.
Approve max value?
Click on btn will create a tx with max spendable about. Is this wanted like this?
Yes, this is intended to save gas on subsequent calls. I think for immutable and audited contracts, this is acceptable behavior.
We should think about how we should move the frontend forward. Most importantly, it would be good to bring today's position page to a higher level of abstraction. It could become a "borrow" page that allows the user to comfortably borrow against a collateral detected in the users wallet.
An open question is whether managing existing positions would still be on this page or not. Could potentially be moved to a separate tab.