pancake-frontend icon indicating copy to clipboard operation
pancake-frontend copied to clipboard

fix: mm trade steps & lock

Open ChefJerry opened this issue 11 months ago • 3 comments


PR-Codex overview

The focus of this PR is to update various functions and components related to permit handling, commit buttons, and approval callbacks in the Swap feature.

Detailed summary

  • Updated permit handling logic in usePermit2Requires.ts
  • Added setLock prop in MMCommitButtonCompV2
  • Refactored approval callback functions in usePermit2.ts
  • Updated node configurations in client.ts
  • Added setLock prop in SwapCommitButtonV2
  • Enhanced error handling in useApproveCallback.ts
  • Updated token imports in useApprove.ts
  • Improved logic in useApproveRequires.ts
  • Added setLock prop in MMSwapCommitButtonV2

The following files were skipped due to too many changes: apps/web/src/views/Swap/MMLinkPools/components/MMCommitButtonV2.tsx, apps/web/src/views/Swap/V3Swap/index.tsx, apps/web/src/views/Swap/V3Swap/hooks/useConfirmModalStateV2.ts, apps/web/src/views/Swap/MMLinkPools/hooks/useMMConfirmModalState.ts

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

ChefJerry avatar Mar 11 '24 12:03 ChefJerry

⚠️ No Changeset found

Latest commit: 0d9c36b2d3dd65f09a4dfe8fb645f6064ef304d4

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

changeset-bot[bot] avatar Mar 11 '24 12:03 changeset-bot[bot]

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

Name Status Preview Comments Updated (UTC)
web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 19, 2024 10:17am
5 Ignored Deployments
Name Status Preview Comments Updated (UTC)
aptos-web ⬜️ Ignored (Inspect) Visit Preview Mar 19, 2024 10:17am
blog ⬜️ Ignored (Inspect) Visit Preview Mar 19, 2024 10:17am
bridge ⬜️ Ignored (Inspect) Visit Preview Mar 19, 2024 10:17am
games ⬜️ Ignored (Inspect) Visit Preview Mar 19, 2024 10:17am
uikit ⬜️ Ignored (Inspect) Visit Preview Mar 19, 2024 10:17am

vercel[bot] avatar Mar 11 '24 12:03 vercel[bot]

Typescript errors check

Yeah, you have removed 645 errors with this PR 👏

217 ts errors detected in all the codebase 😟.

4 ts errors detected in the modified files.

Filename Location Message
apps/web/src/views/Swap/MMLinkPools/components/MMCommitButtonV2.tsx 79, 5 Argument of type 'SmartRouterTrade<TradeType> | null | undefined' is not assignable to parameter of type 'SmartRouterTrade<TradeType> | undefined'.
apps/web/src/views/Swap/MMLinkPools/components/MMCommitButtonV2.tsx 89, 23 Argument of type 'SmartRouterTrade<TradeType> | null' is not assignable to parameter of type 'SetStateAction<SmartRouterTrade<TradeType> | undefined>'.
apps/web/src/views/Swap/MMLinkPools/components/MMCommitButtonV2.tsx 120, 7 Type 'SmartRouterTrade<TradeType> | null' is not assignable to type 'SmartRouterTrade<TradeType> | undefined'.
apps/web/src/views/Swap/MMLinkPools/components/MMCommitButtonV2.tsx 140, 23 Argument of type 'SmartRouterTrade<TradeType> | null' is not assignable to parameter of type 'SetStateAction<SmartRouterTrade<TradeType> | undefined>'.

4 new errors added Note : in some rare cases, new errors can be existing errors but with different locations

chefjackson/action-check-typescript

github-actions[bot] avatar Mar 11 '24 12:03 github-actions[bot]

@ChefJerry please help resolve the unit test issue

chefjackson avatar Mar 19 '24 08:03 chefjackson