-
-
Notifications
You must be signed in to change notification settings - Fork 366
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: teleport warning #11429
fix: teleport warning #11429
Conversation
WalkthroughThe updates remove the checkbox functionality and its associated logic from the Changes
Sequence Diagram(s)sequenceDiagram
participant U as User
participant Modal as EDWarningModal
participant Teleport as Teleport.vue
U->>Modal: Opens Warning Modal
Modal->>U: Displays warning message (only close option)
U->>Modal: Clicks close button
Modal->>Teleport: Emits "close" event
Teleport->>Teleport: Updates modal state (insufficientEDModalOpen = false)
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (4)
💤 Files with no reviewable changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (18)
🔇 Additional comments (3)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
✅ Deploy Preview for koda-canary ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for polkadot ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (2)
components/teleport/Teleport.vue (1)
135-142
: Remove commented-out code.The codebase contains commented-out code for the "Max" button functionality. Clean code practices suggest removing commented-out code as it can be retrieved from version control if needed.
Apply this diff to remove the commented-out code:
- <!-- <NeoButton - no-shadow - rounded - size="small" - class="ml-2" - @click="handleMaxClick" - >{{ $t('teleport.max') }}</NeoButton - > --> -// const handleMaxClick = () => { -// amount.value = myBalance.value -// }Also applies to: 480-482
components/teleport/EDWarningModal.vue (1)
51-57
: Consider adding documentation and improving type safety.Good to have improvements:
- Add JSDoc comments for props and emits to improve maintainability
- Define a proper type for the
Currency
type instead of using the implicit typeExample implementation:
/** * Props for the EDWarningModal component * @property {boolean} modelValue - Controls the visibility of the modal * @property {number|string} sourceExistentialDeposit - Minimum balance required for the source chain * @property {number|string} targetExistentialDeposit - Minimum balance required for the target chain * @property {Currency} currency - The currency symbol/code * @property {'source'|'target'} reason - Indicates whether the warning is for source or target chain */ type Currency = string // Replace with proper type if available const props = defineProps<{ modelValue: boolean sourceExistentialDeposit: number | string targetExistentialDeposit: number | string currency: Currency reason: 'source' | 'target' }>() /** * Events emitted by the EDWarningModal component * @event {void} close - Emitted when the modal should be closed */ const emit = defineEmits(['close'])Also applies to: 61-61
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
components/teleport/EDWarningModal.vue
(3 hunks)components/teleport/Teleport.vue
(1 hunks)i18n/locales/en.json
(1 hunks)i18n/locales/hi.json
(0 hunks)
💤 Files with no reviewable changes (1)
- i18n/locales/hi.json
✅ Files skipped from review due to trivial changes (1)
- i18n/locales/en.json
⏰ Context from checks skipped due to timeout of 90000ms (19)
- GitHub Check: Redirect rules
- GitHub Check: Header rules
- GitHub Check: Pages changed
- GitHub Check: Redirect rules
- GitHub Check: Header rules
- GitHub Check: Pages changed
- GitHub Check: shard (10, 10)
- GitHub Check: shard (9, 10)
- GitHub Check: shard (8, 10)
- GitHub Check: shard (7, 10)
- GitHub Check: shard (6, 10)
- GitHub Check: shard (5, 10)
- GitHub Check: shard (4, 10)
- GitHub Check: shard (3, 10)
- GitHub Check: build
- GitHub Check: shard (2, 10)
- GitHub Check: shard (1, 10)
- GitHub Check: build-cf
- GitHub Check: runner / eslint
🔇 Additional comments (3)
components/teleport/Teleport.vue (1)
175-182
: LGTM! Modal event handling has been simplified.The changes to
TeleportEDWarningModal
correctly simplify the warning flow by removing the redundant@continue
event and relying solely on the@close
event. This aligns with the PR's objective to fix the teleport warning.components/teleport/EDWarningModal.vue (2)
34-34
: LGTM! UI improvements enhance clarity.The changes simplify the warning modal by:
- Converting the checkbox label to static text
- Centering the close button for better visual balance
Also applies to: 37-37
49-49
: LGTM! Code cleanup improves maintainability.The changes:
- Remove unused imports
- Simplify event emissions to match the new functionality
Also applies to: 61-61
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Incorrect impl - #11388 (comment)
|
I remove the checkbox and continue button to avoid the transaction execute anyway. |
Looks good! There was a warning before no? Works for me |
Thank you for your contribution to the Koda - Generative Art Marketplace.
👇 __ Let's make a quick check before the contribution.
PR Type
Needs QA check
Context
Screenshot 📸
Summary by CodeRabbit
New Features
Bug Fixes
Documentation