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 1 commit
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
24 changes: 4 additions & 20 deletions components/teleport/EDWarningModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,22 +31,10 @@
<b>{{ $t('teleport.lossOfFunds') }}</b>
</span>
<div class="flex py-4">
<NeoCheckbox
v-model="checked"
class="mr-3 text-xs"
:label="$t('teleport.checkboxLabel')"
/>
<b>{{ $t('teleport.checkboxLabel') }}</b>
</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 +46,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 +57,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>
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
2 changes: 1 addition & 1 deletion i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1927,7 +1927,7 @@
"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.",
"checkboxLabel": "This action will lead to an irreversible loss of funds.",
"congratsSupport": "Congratulations for supporting",
"destination": "Destination",
"donationSentTo": "Your donation will be sent to:",
Expand Down
1 change: 0 additions & 1 deletion 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 Down