Skip to content

feat: custom input amount on deposit from exchange screen#5004

Merged
tomiir merged 10 commits intomainfrom
feat/custom-input-amount
Sep 12, 2025
Merged

feat: custom input amount on deposit from exchange screen#5004
tomiir merged 10 commits intomainfrom
feat/custom-input-amount

Conversation

@0xmkh
Copy link
Copy Markdown
Collaborator

@0xmkh 0xmkh commented Sep 11, 2025

Description

  • Created <w3m-fund-input> partial
  • Added a custom input field to the <w3m-deposit-from-exchange-view> view
  • Refactored <wui-input-amount> to support fit and auto width variants
  • Implemented UiHelperUtil.maskInput for user-friendly input formatting with maximum decimals and integers

Type of change

  • Chore (non-breaking change that addresses non-functional tasks, maintenance, or code quality improvements)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Associated Issues

For Linear issues: Closes APKT-3760

Showcase (Optional)

demo.mov

Checklist

  • Code in this PR is covered by automated tests (Unit tests, E2E tests)
  • My changes generate no new warnings
  • I have reviewed my own code
  • I have filled out all required sections
  • I have tested my changes on the preview link
  • Approver of this PR confirms that the changes are tested on the preview link

Copilot AI review requested due to automatic review settings September 11, 2025 17:11
@linear
Copy link
Copy Markdown

linear bot commented Sep 11, 2025

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Sep 11, 2025

🦋 Changeset detected

Latest commit: 9d97b87

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 25 packages
Name Type
@reown/appkit-controllers Patch
@reown/appkit-scaffold-ui Patch
@reown/appkit-ui Patch
pay-test-exchange Patch
@reown/appkit-adapter-bitcoin Patch
@reown/appkit-adapter-ethers Patch
@reown/appkit-adapter-ethers5 Patch
@reown/appkit-adapter-solana Patch
@reown/appkit-adapter-wagmi Patch
@reown/appkit Patch
@reown/appkit-utils Patch
@reown/appkit-cdn Patch
@reown/appkit-cli Patch
@reown/appkit-codemod Patch
@reown/appkit-common Patch
@reown/appkit-core Patch
@reown/appkit-experimental Patch
@reown/appkit-pay Patch
@reown/appkit-polyfills Patch
@reown/appkit-siwe Patch
@reown/appkit-siwx Patch
@reown/appkit-testing Patch
@reown/appkit-universal-connector Patch
@reown/appkit-wallet Patch
@reown/appkit-wallet-button Patch

Not sure what this means? Click here to learn what changesets are.

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

@vercel
Copy link
Copy Markdown

vercel bot commented Sep 11, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
appkit-basic-html Ready Ready Preview Comment Sep 12, 2025 11:26am
appkit-demo Ready Ready Preview Comment Sep 12, 2025 11:26am
appkit-gallery Ready Ready Preview Comment Sep 12, 2025 11:26am
appkit-laboratory Ready Ready Preview Comment Sep 12, 2025 11:26am
10 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
appkit-basic-example Ignored Ignored Sep 12, 2025 11:26am
appkit-basic-sign-client-example Ignored Ignored Sep 12, 2025 11:26am
appkit-basic-up-example Ignored Ignored Sep 12, 2025 11:26am
appkit-ethers5-bera Ignored Ignored Sep 12, 2025 11:26am
appkit-nansen-demo Ignored Ignored Sep 12, 2025 11:26am
appkit-vue-solana Ignored Ignored Sep 12, 2025 11:26am
appkit-wagmi-cdn-example Ignored Ignored Sep 12, 2025 11:26am
ethereum-provider-wagmi-example Ignored Ignored Sep 12, 2025 11:26am
next-wagmi-solana-bitcoin-example Ignored Ignored Sep 12, 2025 11:26am
vue-wagmi-example Ignored Ignored Sep 12, 2025 11:26am

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds custom input amount functionality to the deposit from exchange screen. Users can now manually edit the deposit amount instead of being limited to preset values only.

  • Implemented custom input amount field with mask input utility for user-friendly formatting
  • Refactored <wui-input-amount> component to support fit and auto width variants
  • Created new <w3m-fund-input> partial component for the deposit form

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/ui/src/utils/UiHelperUtil.ts Added maskInput utility function for input formatting with decimal/integer limits
packages/ui/tests/UiHelperUtil.test.ts Added comprehensive test coverage for the new maskInput function
packages/ui/src/utils/TypeUtil.ts Added MaskInputOptions type definition
packages/ui/src/composites/wui-input-amount/index.ts Refactored to support fit/auto width variants and use new mask input utility
packages/ui/src/composites/wui-input-amount/styles.ts Updated styles to support width variants and fit-to-content functionality
packages/scaffold-ui/src/partials/w3m-fund-input/index.ts Created new fund input component
packages/scaffold-ui/src/views/w3m-deposit-from-exchange-view/index.ts Integrated custom input field and updated amount handling
packages/controllers/src/controllers/ExchangeController.ts Fixed token amount calculation using NumberUtil for precision

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

cursor[bot]

This comment was marked as outdated.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Sep 11, 2025

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 78.36% 35451 / 45240
🔵 Statements 78.36% 35451 / 45240
🔵 Functions 76.03% 3894 / 5121
🔵 Branches 86.62% 8425 / 9726
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/controllers/src/controllers/ExchangeController.ts 92.98% 87.01% 81.25% 92.98% 75, 106-114, 119-120, 175, 264-272, 305
packages/scaffold-ui/src/partials/w3m-fund-input/index.ts 100% 100% 100% 100%
packages/scaffold-ui/src/views/w3m-deposit-from-exchange-view/index.ts 71.16% 78.78% 71.42% 71.16% 54-55, 70-72, 75-76, 82-84, 106-109, 201-207, 218-221, 227-254, 257-258
packages/ui/src/composites/wui-input-amount/index.ts 76.47% 92.3% 85.71% 76.47% 75-92
packages/ui/src/composites/wui-input-amount/styles.ts 100% 100% 100% 100%
packages/ui/src/utils/ConstantsUtil.ts 100% 100% 100% 100%
packages/ui/src/utils/TypeUtil.ts 100% 100% 100% 100%
packages/ui/src/utils/UiHelperUtil.ts 90.72% 91.04% 92.59% 90.72% 14, 129-130, 132-137, 159-165
Generated in workflow #15032 for commit 9d97b87 by the Vitest Coverage Report Action

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

@tomiir tomiir enabled auto-merge September 12, 2025 11:47
@tomiir tomiir added this pull request to the merge queue Sep 12, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Sep 12, 2025
@0xmkh 0xmkh added this pull request to the merge queue Sep 12, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Sep 12, 2025
@tomiir tomiir merged commit 21f7512 into main Sep 12, 2025
42 checks passed
@tomiir tomiir deleted the feat/custom-input-amount branch September 12, 2025 12:45
@github-actions github-actions bot locked and limited conversation to collaborators Sep 12, 2025
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