-
Notifications
You must be signed in to change notification settings - Fork 101
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
chore(release): 1.48.0 #3203
chore(release): 1.48.0 #3203
Conversation
* feat: add permit tag token selector * feat: add permit tag token selector * feat: optimize * Permit styles [Modal/Stepper/IconSpinner] (#3097) * feat: updates * feat: updates * feat: updates * feat: updates * feat: updates * feat: fix box shadow var * feat: optimize * feat: optimize IconSpinner (#3099) * feat: optimize IconSpinner * feat: optimize * feat: add ENUM * feat: add ENUM (#3110) * feat: updates * feat: updates * feat: updates * feat: updates * feat: updates * feat: fix box shadow var * feat: optimize * feat: optimize IconSpinner (#3099) * feat: optimize IconSpinner * feat: optimize * feat: add ENUM * feat: add ENUM * feat: add ENUM * feat: add ENUM usage * feat: add ENUM usage * feat: add ENUM usage * fix: restore yarn.lock to version matching parent branch * fix: reverted package.json changes as well * chore: restore once again yarn.lock * feat: add ENUM usage * feat: add ENUM usage --------- Co-authored-by: Alfetopito <[email protected]> * feat: updates --------- Co-authored-by: Alfetopito <[email protected]>
…#3103) * fix: trim eth-flow contract abi json file * fix(eth-flow): additionally check eth-flow order id in smart-contract * chore: remove unused ABI * chore: rename checkEthFlowOrderExists
* chore: remove ethFlowBundlingEnabled feature flag * chore: remove txBundlingEnabled feature flag * refactor: merge safe bundling of wrap and approval It was fomerly controlled by 2 independent feature flags Now it only needs to know whether the wallet used supports it * chore: remove partialFillsEnabled feature flag * chore: remove advancedOrdersEnabled feature flag * fix: fix unit tests mocking * fix: add TWAP orders back to main menu
* feat: permit hack * feat: permit hack * feat: permit hack * feat: permit hack * Fix code style issues with Prettier * try to make work with UNI token * Fix order signing * add hooks to quote for correct fee * Fix code style issues with Prettier * fix: put appData to quote request * refactor: add appData optional prop to LegacyFeeQuoteParams * refactor: simplify if condition * chore: made contract addresses not Partial as all chainIds are defined * chore: add @1inch/permit-signed-approvals-utils dependency * feat: first draft of the estimatePermit fn. Not yet tested! * chore: added a draft of useIsTokenPermittable still untested! * chore: update permitTokenChecker return types * feat: add hook usePermitHookParams * feat: update generatePermitHook to accept permitInfo and handle dai like permit * chore: add permitInfo to swapFlowContext * chore: update price quote data with permit info if permit params present * fix: use correct way to encode call data when using ethersjs * chore: debug statements REVERT ME! * fix: remove EIP712Domain before signing typed message * feat: use fake signer when checking whether token is permittable * chore: account is irrelevant for checking whether token is permittable * chore: add todos regarding app data merging * fix: properly await async methods * fix: gasLimit must be a string on appData hooks * chore: update .gitignore * feat: add permit module * chore: replace useIsTokenPermittable with hook from permit module * chore: update cow-sdk and app-data to latest RC versions * chore: move checkIsTokenPermittable into permit module * chore: move generatePermitHook to permit module * chore: move usePermitHookParams to permit module * chore: add appDataHash optional param to LegacyFeeQuoteParams * chore: do not pass permitHookParams around * chore: add util fn buildAppDataHooks * chore: add atom appDataHooksAtom * chore: do not mutate the appData on signAndPostOrder * chore: use appData in the quote params * chore: make buildAppData accept hooks metadata * chore: add addHooksToAppData fn * chore: add helper hooks to deal with appDataHooks * chore: update hooks inside appData updater * chore: export more stuff from appData module * chore: add usePermitHookData * chore: update appData when fee request is updated * chore: trigger permit signature when placing swap merging with existing appData * chore: remove unused method to generate permit * test: fix unittests * chore: refactor buildAppDataHooks * chore: refactor permit types * chore: remove debug statements * chore: replace magic hex with import form 1inch lib * refactor: hide magic string replacement behind helper function * chore: return e.message if available * chore: move constants to const file * chore: upper case local consts names * chore: use a constant PK rather than creating a random one every time * chore: move PermitProviderConnector to wallet module * refactor: rename generateQuotePermitHook to generatePermitHook * chore: export generatePermitHook from permit module * refactor: simplify permit's module hook interface Internalize the usage of usePermitHookParams * chore: chainId cannot be falsy * refactor: simplify useAddPermitInfo hook * refactor: useFakePermitHookData no longer takes in any parameter * chore: move appDataHooks updater inside appData module * fix: fix issue with appData not updating when it shouldn't * refactor: add in memory caching for checkIsTokenPermittable requests * refactor: cache on generatePermitHook * chore: return PermitHookData from generatePermitHook instead of a string * refactor: split permit hooks into individual hook files * chore: remove debug statements * chore: remove unnecessary cast to any * chore: rename DEFAULT_PERMIT_DURATION * chore: fix typo * chore: fix useTradeQuotePolling test * fix: let ethers be part of the main chunk Otherwise the whole page fails to load :( * chore: app is not starting now because of cowprotocol chunk removing it... * chore: get rid of metamask chunk too because doesn't work otherwise :/ * chore: add return type to generateAppDataFromDoc * chore: rename hooks updaters to component updaters * refactor: rename useFake->useAccountAgnostic * refactor: make PERMIT_GAS_LIMIT_MIN a single const rather than an obj with repeated values * chore: use stringifyDeterministic to generate appData * fix: update token logo cache after tokens list loading (#3100) * fix: fix crash tokens page due to tiny price (#3111) * chore: remove duplicated file * chore: work with strings for the price to avoid JS number finicky-ness * chore: do not try to calculate prices when it's < 1 USDC atom * chore: only number without integer part are too small * test: fix unit tests * feat: add new static fromNumber to FractionUtils * feat: create CurrencyAmounts from Fraction instances * chore: use Fraction rather than string or number to store prices * chore: it can be equal to 1 usdc atom * test: fix unit tests * fix(twap): load TWAP part details (#3113) * fix(price-impact): display unknown price impact warning only when there is no data (#3114) * fix(swap): reset state after network changes (#3116) * chore: allow enough balance check to return unknown state (#3106) * chore: allow enough balance check to return unknown state * chore: allow undefined in the getPriceQuality fn * chore: refactor repetitive code * chore: add nit to simplify expresssion Co-authored-by: Leandro <[email protected]> * chore: move logic to private function * chore: don't allow to check quotes with same sellToken and buyToken * chore: add private function * fix: add mapping for error in the buttons map --------- Co-authored-by: Leandro <[email protected]> * chore: reduce queries from unfillable updater (#3107) * chore: uipdate query time to 30s * chore: do not clear intervals because of a change in the update function * fix: make sure we invoke the latest update function * chore: reduce the times the update function is recreated * Remove ref from dependencies Co-authored-by: Leandro <[email protected]> * chore: remove unecesary log --------- Co-authored-by: Leandro <[email protected]> * fix: add html space chars before banner token symbols (#3117) * fix(usd-amount): fallback to native_price API if Coingecko doesn't know the currency (#3120) * fix(usd-amount): delete token from queue only if there are no subscribers left (#3121) * fix: surplus modal flickering (#3124) * fix: fix mapping network name from URL query to chainId (#3125) * chore(main): release 1.47.0-RC.0 (#3126) * Permit styles tag 1 (#3083) * feat: add permit tag token selector * feat: add permit tag token selector * feat: optimize * Permit styles [Modal/Stepper/IconSpinner] (#3097) * feat: updates * feat: updates * feat: updates * feat: updates * feat: updates * feat: fix box shadow var * feat: optimize * feat: optimize IconSpinner (#3099) * feat: optimize IconSpinner * feat: optimize * feat: add ENUM * feat: add ENUM (#3110) * feat: updates * feat: updates * feat: updates * feat: updates * feat: updates * feat: fix box shadow var * feat: optimize * feat: optimize IconSpinner (#3099) * feat: optimize IconSpinner * feat: optimize * feat: add ENUM * feat: add ENUM * feat: add ENUM * feat: add ENUM usage * feat: add ENUM usage * feat: add ENUM usage * fix: restore yarn.lock to version matching parent branch * fix: reverted package.json changes as well * chore: restore once again yarn.lock * feat: add ENUM usage * feat: add ENUM usage --------- Co-authored-by: Alfetopito <[email protected]> * feat: updates --------- Co-authored-by: Alfetopito <[email protected]> * chore: refactor and simplify pixel logic (#3118) * chore: remove pixels (#3119) * fix(eth-flow): additionally check eth-flow order id in smart-contract (#3103) * fix: trim eth-flow contract abi json file * fix(eth-flow): additionally check eth-flow order id in smart-contract * chore: remove unused ABI * chore: rename checkEthFlowOrderExists * fix(usd-price): handle individual token price query failure (#3127) * fix: handle individual token price query failure * chore: processQueue will no longer throw * chore: remove resetAtom as it's no longer used * chore(main): release 1.47.0 (#3129) * refactor: rename InnerAppDataUpdater to AppDataInfoUpdater * feat(permit): check allowance (#3102) * chore: update the quote if appData changes * chore: refactor useEnoughBalanceAndAllowance to return balance/alloance results separately * chore: propage hasEnoughAllowance to swapFlow * refactor: rename addHooksToAppData to updateHooksOnAppData and remove hooks when unset * chore: only add hooks to order when needed, and remove when not needed * chore: show approval status now includes permittable tokens * chore: hasEnoughAllowance can be undefined * Revert "refactor: make PERMIT_GAS_LIMIT_MIN a single const rather than an obj with repeated values" This reverts commit fbddd09. * chore: reduce gas limit min for Goerli to 36k down from 55k * refactor: move default to constant * fix: rework request caching to prevent caching failed promises * chore: calculate gasLimit again using the account address * chore: hardcode gas limit to 80k * feat(permit): feature flag (#3135) * chore: add feature flags hook useIsPermitEnabled * feat: do not query/return any result when permit is not enabled * feat(permit): better gas limit estimation (#3138) * feat: use estimated gasLimit for quotes if higher than default * chore: add 10% to quote gas limit estimation for additional wiggle room * chore: estimate gas for real accounts also, but without extra 10% * chore: use a new empty private key for estimating the permits --------- Co-authored-by: Alexandr Kazachenko <[email protected]> Co-authored-by: Lint Action <[email protected]> Co-authored-by: Nicholas Rodrigues Lordello <[email protected]> Co-authored-by: Anxo Rodriguez <[email protected]> Co-authored-by: fairlight <[email protected]>
* feat(wallet-connect-2): load wc2 connector async-ly * feat: wallet connect v1 lazy loading * chore: fix import * chore: merge develop * chore: fix imports
* refactor: remove amplitude analytics * chore: remove unused code * chore: fix build * chore: fix lint
* feat: add 3rd party banner * feat: icon component * feat: banner component * feat: banner component * feat: fix cosmos fixture * feat: fix cosmos fixture * feat: add checks * feat: add checks * feat: fix type * chore(recipient-warning): 3rd party recipient banner wire up (#3131) * fix: inline banner types * chore: add owner to ParsedOrder * chore: add receiverWalletBannerVisibility state * chore: use new state on activity details and receipt modal * chore: update previous hook from CustomRecipientWarningBanner * chore: simplify and export isPending util fn * chore: only show recipient warning banner when pending * chore: simplify message and do not mention the Safe * refactor: remove SwapModalHeaderMod * chore: only display on dismiss button when there's a dismiss fn * chore: show recipient warning on swap confirm modal * chore: show recipient warning on limit and twap confirm modals * fix: error handling for emulated twap orders * chore: remove unused hook useBannerVisibility * chore: refactor getColorEnums * chore: fix import * chore: remove redundant try/catch * chore: fix imports * chore: fix imports --------- Co-authored-by: Leandro <[email protected]> Co-authored-by: Alexandr Kazachenko <[email protected]>
* fix(twap): approve infinite amount * chore: fix test * chore: fix import
* chore: remove unused code * fix(limit-orders): fix tooltips displaying in settings
…3144) * chore: remove unused code * fix(limit-orders): fix tooltips displaying in settings * refactor(limit-orders): replace allowance warn tooltip by a new one * feat(orders-table): approve order token from allowance warn tooltip * chore: test commit
* chore: move getPermitUtilsInstance to its own file * fix: add default permit duration to Date.now() before transforming from ms to s * feat: check whether permit is still valid based on nonce * refactor: await the fn right where its declared * chore: remove debug statements * chore: lowercase account address in the cache key * chore: do one permit utils instance cache per type
* chore: remove redundant appData. It's already inside postOrderParams * feat: do not show approval button when token is permittable * chore: pass permit related params to limit orders' tradeFlowContext * feat: use permit hook when placing limit order * feat: add handlePermit util fn * refactor: use handlePermit on swapFlow and tradeFlow * fix: update TradeFlowContext instances * chore: move analytics after permit
* fix: don't fetch tokens list ens hashes * fix: cache token list ens hash for 6 hours * chore: refactor
* 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
* 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
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
* 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
Permit flow
Other permit cases Shouldn't ask permit signing twice
|
* fix(swap): handle errors from order posting API * chore: capitalize first letter of error * chore: move capitalizeFirstLetter to lib
CLA Assistant Lite bot: I have read the CLA Document and I hereby sign the CLA 2 out of 4 committers have signed the CLA. |
* chore: return `false` only when it's a known failure * refactor: add return type * chore: improve permit detection logging * chore: update every package related to @web3-react/walletconnect-v2 - Removed @web3-react/walletconnect - Added @walletconnect/ethereum-provider as it's a dependency of @web3-react/walletconnect-v2 - Moved @web3-react/types to dev deps * chore: add more logging to permit utils creation * fix: lib @walletconnect/ethereum-provider path changed * fix: remove aliases no longer needed * fix: update async connector provider on network changes from wallet * chore: reduce some logging --------- Co-authored-by: Alexandr Kazachenko <[email protected]>
* fix(eth-flow): update refund info for expired orders * chore: update comment * chore: fix ExpiredOrdersUpdater conditions * chore: fix namings
Summary
Release
1.48.0
Features
** Gnosis chain not supported yet. USDC mainnet not working yet. There might be more tokens that also do not work, have not tested all of them.
Minor changes
Bug fixes
Technical debt
To Test
✨ NEW FEATURE ✨
Regular flow testing
Smart contract wallet (Safe):
EOA wallet (Metamask):
WalletConnect v2:
Account page:
Common (WalletConnect/Metamask):