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: teleport warning #11429

Merged
merged 2 commits into from
Feb 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 4 additions & 23 deletions components/teleport/EDWarningModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,25 +28,10 @@
currency,
])
}}
<b>{{ $t('teleport.lossOfFunds') }}</b>
<b>{{ $t('teleport.failedTransaction') }}</b>
</span>
<div class="flex py-4">
<NeoCheckbox
v-model="checked"
class="mr-3 text-xs"
:label="$t('teleport.checkboxLabel')"
/>
</div>
</div>
<div class="flex mt-5 items-center justify-between">
<NeoButton
variant="pill"
:disabled="!checked"
class="mr-4"
no-shadow
:label="$t('massmint.mobileDisclaimer.continueAnyway')"
@click="emit('continue')"
/>
<div class="flex mt-5 items-center justify-center">
<NeoButton
variant="pill"
:label="$t('autoTeleport.close')"
Expand All @@ -58,7 +43,7 @@
</template>

<script setup lang="ts">
import { NeoButton, NeoCheckbox, NeoIcon, NeoModal } from '@kodadot1/brick'
import { NeoButton, NeoIcon, NeoModal } from '@kodadot1/brick'

const props = defineProps<{
modelValue: boolean
Expand All @@ -69,10 +54,6 @@ const props = defineProps<{
}>()

const isModalActive = useVModel(props, 'modelValue')
const checked = ref(false)
watch(isModalActive, () => {
checked.value = false
})

const emit = defineEmits(['close', 'continue'])
const emit = defineEmits(['close'])
</script>
2 changes: 1 addition & 1 deletion components/teleport/FundsAtRiskWarning.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
targetExistentialDeposit,
])
}}
<b>{{ $t('teleport.lossOfFunds') }}</b>
<b>{{ $t('teleport.failedTransaction') }}</b>
</span>
<a
v-safe-href="
Expand Down
22 changes: 8 additions & 14 deletions components/teleport/Teleport.vue
Original file line number Diff line number Diff line change
Expand Up @@ -172,21 +172,15 @@
</a>
{{ $t('teleport.ownerMessage') }}
</div>
<TeleportEDWarningModal
v-model="insufficientEDModalOpen"
:target-existential-deposit="targetExistentialDeposit.displayValue"
:source-existential-deposit="sourceExistentialDeposit.displayValue"
:reason="warningReason"
:currency="currency"
@close="insufficientEDModalOpen = false"
/>
</form>
<TeleportEDWarningModal
v-model="insufficientEDModalOpen"
:target-existential-deposit="targetExistentialDeposit.displayValue"
:source-existential-deposit="sourceExistentialDeposit.displayValue"
:reason="warningReason"
:currency="currency"
@continue="
() => {
insufficientEDModalOpen = false
teleport()
}
"
@close="insufficientEDModalOpen = false"
/>
</template>

<script setup lang="ts">
Expand Down
7 changes: 3 additions & 4 deletions i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1927,28 +1927,27 @@
"artistProfile": "Go to artist's profile",
"bridging": "Bridging {0} {1}",
"btnCopyPayment": "Copy Payment link",
"checkboxLabel": "I understand this action will lead to an irreversible loss of funds.",
"congratsSupport": "Congratulations for supporting",
"destination": "Destination",
"donationSentTo": "Your donation will be sent to:",
"existentialDepositTooltip": "Amounts Below {0} + Fees Risk Being Lost. Enter The Minimum To Proceed.",
"failedTransaction": "Failed Transaction and Loss of Transaction Fee",
"from": "From",
"fundLossRisk": "Funds Loss Risk",
"fundsAtRisk": "Funds at risk",
"howItWorks": "How It Works?",
"insufficientAmountAfterFees": "Insufficient amount after fees",
"insufficientBalance": "Insufficient {0} Balance",
"lossOfFunds": "Loss Of Funds.",
"max": "Max",
"ownerMessage": "(You Are Owner)",
"page": "Teleport",
"proceedToConfirmation": "Proceed To Confirmation",
"receiveValue": "You will receive {0} {1} on {2} to",
"send": "Send",
"source": "Source chain",
"sourceExistentialDepositWarning": "keeping Less Than {0} {1} (existential deposit) + Fees Will Lead To An Irreversible",
"sourceExistentialDepositWarning": "Keeping Less Than {0} {1} (existential deposit) + Fees Will Lead To",
"subtitle": "Easy Asset Teleportation from One Network to Another",
"targetExistentialDepositWarning": "Transferring Less Than {0} {1} (existential deposit) + Fees Will Lead To An Irreversible",
"targetExistentialDepositWarning": "Transferring Less Than {0} {1} (existential deposit) + Fees Will Lead To",
"to": "To",
"tweetDonation": "Tweet about your awesome donation",
"usdInput": "USD Value (approx)",
Expand Down
4 changes: 0 additions & 4 deletions i18n/locales/hi.json
Original file line number Diff line number Diff line change
Expand Up @@ -1428,7 +1428,6 @@
"amount": "Asset मात्रा",
"artistProfile": "कलाकार के प्रोफाइल पर जाएं",
"btnCopyPayment": "भुगतान लिंक कॉपी करें",
"checkboxLabel": "मुझे समझ में आता है कि इस क्रिया से धन की अपरिवर्तनी हानि होगी।",
"congratsSupport": "समर्थन के लिए बधाई",
"destination": "गंतव्य",
"donationSentTo": "आपका दान भेजा जाएगा:",
Expand All @@ -1439,17 +1438,14 @@
"howItWorks": "यह कैसे काम करता है?",
"insufficientAmountAfterFees": "शुल्क के बाद अपर्याप्त मात्रा",
"insufficientBalance": "अपर्याप्त {0} शेष",
"lossOfFunds": "Fund्स की हानि।",
"max": "अधिकतम",
"ownerMessage": "(आप मालिक हैं)",
"page": "टेलीपोर्ट",
"proceedToConfirmation": "पुष्टि के लिए आगे बढ़ें",
"receiveValue": "आपको {0} {1} प्राप्त होगा {2} पर",
"send": "भेजें",
"source": "स्रोत श्रृंग",
"sourceExistentialDepositWarning": "एक अपरिवर्तनी होगा जब भी {0} {1} (अस्तित्व जमा) + शुल्क कम से कम होगा",
"subtitle": "एक Network से दूसरे Network में आसान Asset Teleportation",
"targetExistentialDepositWarning": "एक अपरिवर्तनी होगा जब भी {0} {1} (अस्तित्व जमा) + शुल्क कम से कम होगा",
"to": "को",
"tweetDonation": "अपने शानदार दान के बारे में ट्वीट करें",
"usdInput": "USD मूल्य (अनुमानित)",
Expand Down
Loading