Skip to content

Commit 805c24c

Browse files
cursor[bot]cursoragentkeithbro-imx
authored
feat(checkout-widgets): update price impact warning message (#2661)
Co-authored-by: Cursor Agent <[email protected]> Co-authored-by: keith.broughton <[email protected]>
1 parent 73f455f commit 805c24c

File tree

2 files changed

+57
-1
lines changed

2 files changed

+57
-1
lines changed

.cursorrules

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Cursor Rules for Immutable SDK
2+
3+
## Conventional Commits
4+
5+
Always use conventional commit format for all commits and PR titles:
6+
7+
```
8+
<type>[optional scope]: <description>
9+
10+
[optional body]
11+
12+
[optional footer(s)]
13+
```
14+
15+
### Types
16+
- **feat**: A new feature
17+
- **fix**: A bug fix
18+
- **docs**: Documentation only changes
19+
- **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
20+
- **refactor**: A code change that neither fixes a bug nor adds a feature
21+
- **perf**: A code change that improves performance
22+
- **test**: Adding missing tests or correcting existing tests
23+
- **build**: Changes that affect the build system or external dependencies
24+
- **ci**: Changes to CI configuration files and scripts
25+
- **chore**: Other changes that don't modify src or test files
26+
- **revert**: Reverts a previous commit
27+
28+
### Scope Guidelines
29+
- **IMPORTANT**: Scopes should match the names of packages in the repo (without the `@imtbl/` prefix)
30+
- Examples of valid scopes: `checkout-widgets`, `passport`, `config`, `blockchain-data`, etc.
31+
- Find the correct scope by checking the package.json `name` field in the relevant package directory
32+
- Use the full package name after `@imtbl/` (e.g., if package is `@imtbl/checkout-widgets`, use `checkout-widgets`)
33+
34+
### Examples
35+
- `feat(checkout-widgets): update price impact warning message`
36+
- `fix(passport): resolve token validation error`
37+
- `docs(config): add installation instructions`
38+
- `refactor(blockchain-data): simplify token formatting logic`
39+
40+
### PR Title Guidelines
41+
- Use the same conventional commit format for PR titles
42+
- Keep titles under 50 characters when possible
43+
- Use lowercase for the description
44+
- Be descriptive but concise
45+
- **ALWAYS** include the scope matching the package name (without `@imtbl/` prefix)
46+
47+
### Commit Message Guidelines
48+
- Use imperative mood in the subject line ("add" not "added" or "adding")
49+
- Capitalize the first letter of the description
50+
- Do not end the subject line with a period
51+
- Limit the subject line to 50 characters
52+
- Separate subject from body with a blank line
53+
- Use the body to explain what and why vs. how
54+
- Wrap the body at 72 characters
55+
56+
When creating PRs, always follow this conventional commit style for both the commit messages and PR titles.

packages/checkout/widgets-lib/src/widgets/swap/components/SwapForm.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1100,7 +1100,7 @@ export function SwapForm({ data, theme, cancelAutoProceed }: SwapFromProps) {
11001100
<Body size="xxSmall">
11011101
{quoteError instanceof PriceImpactError
11021102
// eslint-disable-next-line max-len, @typescript-eslint/quotes
1103-
? `Your swap amount is too large for current market conditions. This means you'd get a less favorable exchange rate. Try a smaller amount.`
1103+
? `Your proposed swap amount is too large for current market conditions. There is a significant risk of price slippage and a less favourable swap rate. Try a smaller amount.`
11041104
: 'This token pairing is not available to swap right now. Try another selection.'}
11051105
</Body>
11061106
</Box>

0 commit comments

Comments
 (0)