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

fix: deprecate v1 swap amountReference to #1851

Merged
merged 6 commits into from
Jan 23, 2025

Conversation

alessey
Copy link
Contributor

@alessey alessey commented Jan 22, 2025

What changed? Why?

  • Added error if amountReference: 'to' is used with the useAggregator: true param
  • Updated Buy component to use amountReference: 'from' (default value) for quotes
  • Update Buy component input to show numeric keyboard on mobile devices
  • Fixed AmountReference type

Notes to reviewers

How has it been tested?

Copy link

vercel bot commented Jan 22, 2025

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

Name Status Preview Comments Updated (UTC)
onchainkit-coverage ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 22, 2025 7:51pm
onchainkit-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 22, 2025 7:51pm
onchainkit-routes ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 22, 2025 7:51pm

@alessey alessey force-pushed the alessey/deprecate-v1-reference-to branch from 37921d4 to fb0eee8 Compare January 22, 2025 14:53
@alessey alessey force-pushed the alessey/deprecate-v1-reference-to branch from fb0eee8 to 05d3ab1 Compare January 22, 2025 16:01
@alessey alessey force-pushed the alessey/deprecate-v1-reference-to branch from 05d3ab1 to b2616af Compare January 22, 2025 16:02
@alessey alessey force-pushed the alessey/deprecate-v1-reference-to branch from b2616af to 0bdce99 Compare January 22, 2025 16:15
@@ -14,7 +16,7 @@ vi.mock('../network/request');

const testFromAddress = '0x6Cd01c0F55ce9E0Bf78f5E90f72b4345b16d515d';
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
const testFromAddress = '0x6Cd01c0F55ce9E0Bf78f5E90f72b4345b16d515d';
const testFromAddress: Address = '0x6Cd01c0F55ce9E0Bf78f5E90f72b4345b16d515d';

it('should return an error for an unsupported amount reference', async () => {
const mockParams = {
useAggregator: true,
fromAddress: testFromAddress as `0x${string}`,
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
fromAddress: testFromAddress as `0x${string}`,
fromAddress: testFromAddress,

@@ -30,6 +30,7 @@ export function BuyAmountInput() {
)}
placeholder="0.0"
delayMs={1000}
inputMode="decimal"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

sets the Buy component to use the number keypad on mobile devices

@alessey alessey merged commit 2f48a95 into main Jan 23, 2025
16 checks passed
@alessey alessey deleted the alessey/deprecate-v1-reference-to branch January 23, 2025 22:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

4 participants