Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Widget UI 6 #3220

Closed
wants to merge 62 commits into from
Closed

Widget UI 6 #3220

wants to merge 62 commits into from

Conversation

fairlighteth
Copy link
Contributor

@fairlighteth fairlighteth commented Oct 12, 2023

Summary

  • yarn start-widget
  • General widget improvements

shoom3301 and others added 24 commits September 28, 2023 06:09
* chore: fix cosmos CI

* chore: fix cosmos CI
* chore: change TradeType enum from number to string

* refactor: minor linting

* fix: do not pass a obj key with undefined

* chore: add TradeType to TradeDerivedState

* feat: add const with mapping of order types and whether it supports permit

⚠️ limit permit support is disabled

* feat: require TradeType to indentify whether token is permittable

* chore: reset permit hook data when there are no pemrit params

* fix: unit tests
…ol/hotfix/1.47.1

Hotfix/1.47.1

release-as: 1.47.1
…ain--components--release-please-action

chore(main): release 1.47.1
* feat: skeleton for SelectTokenModal

* chore: setup SelectTokenModal cosmos

* chore: styles SelectTokenModal

* chore: select token modal styles
* feat: remove walletConnect v1 and use v2 by default

* chore: walletconnect icon

* chore: remove tooltip
* feat: skeleton for SelectTokenModal

* chore: setup SelectTokenModal cosmos

* chore: styles SelectTokenModal

* chore: select token modal styles

* feat: html of ManageListsAndTokens

* chore: manage lists styles

* chore: manage tokens styles

* chore: import token from blockchain UI

* chore: search tokens sources

* chore: extract ModalHeader component

* chore: component ImportTokenModal

* chore: manage lists states

* chore: component ImportListModal

* chore: fix build
* refactor: extract NewModal into its own folder

* refactor: only set permitInfo if there is not enough allowance

* refactor: use setter to load current state rather than relying on stale one

* feat: store permit status on swap state

* fix: remove hasEnoughAllowance from TradeFlowContext

* chore: use relative imports inside the module

* feat: add PermitModal pure and container

* chore: export cosmos command for easier access

* refactor: simplify TokenAmount interface (it was doubling Nullish<>)

* refactor: sort imports

* chore: pass trade and swapConfirmState to TransactionConfirmationModal

* feat: add PermitModal to TransactionConfirmationModal

* chore: redid the logic to update the signature requesting

* refactor: always set permitSignatureState

* chore: remove stale comment

* chore: update handlePermit export to fix build warning

* chore: outputAmountWithoutFee never needed to be optional

* chore: use TradeAmounts instead of TradeGp
* chore: turn permit on for LIMIT

* fix: typo

* refactor: beforeTrade is always set

* refactor: optimize/refactor derived atoms

* feat: add permitSignatureState and setPermitSignatureRequestedTradeConfirmAtom

* feat: add requestPermitSignature action

* refactor: extract buildTradeAmounts local fn

* feat: add beforePermit to limitOrders tradeFlow

* feat: show PermitModal for LIMIT

* feat: fix new cow modal styles (#3177)

* feat: fix new cow modal styles

* feat: fix new cow modal styles

* feat: fix new cow modal styles

---------

Co-authored-by: Michel <[email protected]>

* chore: add order type to PermitModal

* refactor: clean up TradeConfirmalModal

* fix: pass along PermitModal props to Pure component

* chore: remove comment about backend PR, which has been merged

---------

Co-authored-by: fairlight <[email protected]>
Co-authored-by: Michel <[email protected]>
* refactor: move permit/state/atoms.ts to permittableTokensAtom.ts

* feat: add permitCacheAtoms

* feat: add useGeneratePermitHook

* feat: remove localStorage caching from generatePermitHook

* feat: replace generatePermitHook with useGeneratePermitHook

* test: update unit tests

* refactor: export * from permit hooks rather than individual exports

* chore: throw when permitData cannot be generated by generatePermitHook

* chore: fix comment

* refactor: there's no need to pass an extra preFetchedNonce param

* refactor: create curried fn to avoid repetition
* refactor: remove unnecessary toString()

* chore: fix typo

* fix: transform BigNumber instances into hex strings for compatibility with 1inch lib

* feat: add fullAppData to local order instance

* feat: add decodeAppData to appData module

* feat: add getAppDataHooks to appData module

* feat: add useCheckHasValidPendingPermit to permit module

* feat: add permit checking to OrderRow allowance warning

* refactor: rename getParsedOrderFromItem to getParsedOrderFromTableItem

* refactor: change isParsed order to be a bit more semantic

* feat: add ordersPermitStatusAtom

* feat: add PendingPermitUpdater

* feat: add useGetOrdersPermitStatus

* feat: pass down ordersPermitStatus

* feat: add PendingPermitUpdater to OrdersTableWidget

* chore: remove unused export

* refactor: sort exports

* fix: add back export. I removed the wrong one 🤦

* refactor: extract useGetOrdersToCheckPendingPermit

* chore: debug statements

* fix: force atoms to load so stored value is respected

* refactor: use the handy atomWithPartialUpdate

* refactor: move useGetOrdersToCheckPendingPermit to its own file
@vercel
Copy link

vercel bot commented Oct 12, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
swap-dev ✅ Ready (Inspect) Visit Preview Oct 16, 2023 11:33am

🌃 Cosmos ↗︎

shoom3301 and others added 13 commits October 17, 2023 02:50
* chore: remove unused prop `gasLimit` from SupportedPermitInfo

* feat: query and add version to permitInfo

* feat: bump permittableTokensAtom storage key to `v1`

* fix: usdc default tokens had the wrong name, causing the permit signature to fail

* chore: temporarily logging permit callData and params

* fix: hack to fix USDC token name when creating the permit callData

* feat: do not check for permit version if token cannot handle it

* chore: remove console logs
Copy link
Contributor

@anxolin anxolin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to review, but I will need to allocate more time. It has 6K changes 🤯

You will get merge conflicts if you don't start to merge to develop (and cleanup).
So we will need to consolidate soon

@@ -0,0 +1,85 @@
import ICON_ARROW from 'assets/icon/arrow.svg'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NewModal? I would avoid naming it like this. Later we will have NewNewModal :)

Or this is part of a plan of replacing the modals and it will be renamed later?

`

const ModalFixtures = {
'new modal + content top/bottom': (
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would think fixtures should be more simple, just as a show case with minimal code.

Also, its a bit hard to see the modal boundaries currently since the bg color in the fixture is the same as the modal:

image

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this the component you wanted to have a BACK button instead of a close?

@github-actions github-actions bot locked and limited conversation to collaborators Oct 20, 2023
@fairlighteth fairlighteth deleted the widget-ui-6 branch July 4, 2024 15:06
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants