Skip to content

Commit 58ddf6e

Browse files
authored
Change warning on EVM local transfer (#783)
* update warning message * update css & only visible on EVM input * show prev warning * only visible isH160 * update warning message
1 parent a3d2a2a commit 58ddf6e

3 files changed

Lines changed: 36 additions & 1 deletion

File tree

src/components/assets/transfer/LocalTransfer.vue

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,10 +132,29 @@
132132
>
133133
{{ $t('assets.modals.notSendToEvmExchanges') }}
134134
</span>
135-
<span v-else :class="isChecked ? 'color--gray1' : 'color--not-checked'">
135+
<span v-else-if="!isH160" :class="isChecked ? 'color--gray1' : 'color--not-checked'">
136136
{{ $t('assets.modals.notSendToExchanges') }}
137137
</span>
138138
</div>
139+
<span
140+
v-if="isH160 && !isNativeToEvm"
141+
:class="isChecked ? 'color--gray1' : 'color--not-checked'"
142+
>
143+
<div class="row--warning-title">
144+
<div class="icon--warning">
145+
<astar-icon-warning size="20" />
146+
</div>
147+
<span
148+
class="text--title-evm-warning"
149+
:class="isChecked ? 'color--gray1' : 'color--not-checked'"
150+
>
151+
{{ $t('warning.warning') }}
152+
</span>
153+
</div>
154+
<div class="text--warn">
155+
{{ $t('assets.modals.notDestIsLedgerAccount') }}
156+
</div>
157+
</span>
139158
</label>
140159
</div>
141160
</div>

src/components/assets/transfer/styles/local-transfer.scss

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,18 @@
292292
column-gap: 8px;
293293
}
294294

295+
.text--dot {
296+
position: relative;
297+
top: 4px;
298+
font-size: 24px;
299+
font-weight: 700;
300+
}
301+
302+
.text--warn {
303+
padding-left: 10px;
304+
line-height: 20px;
305+
}
306+
295307
.text--title-evm-warning {
296308
font-weight: 700;
297309
font-size: 14px;

src/i18n/en-US/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,10 @@ export default {
403403
notSendToExchanges: 'I’m NOT sending tokens to Exchanges',
404404
notSendToEvmExchanges:
405405
"I’m NOT sending tokens to Exchange's EVM deposit addresses. I understand that if I do so, the funds will likely be lost.",
406+
understandWarning: 'I understand the following. If don’t, I will lose my funds.',
407+
notDestIsLedgerAccount:
408+
'The destination address is neither a ledger native account nor an exchange address. I understand that if I do so, the funds will likely be lost.',
409+
notDestIsExchangeAddress: 'Destination address is not an Exchange address',
406410
youWillReceive: 'You will receive',
407411
faucetNextRequest: 'Time left until the next request',
408412
countDown: '{hrs} hrs {mins} mins {secs} secs',

0 commit comments

Comments
 (0)