Skip to content

Commit

Permalink
fix: fixed eth required message component
Browse files Browse the repository at this point in the history
  • Loading branch information
bradleySuira committed Dec 1, 2022
1 parent 7cf111f commit e4f2e72
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
8 changes: 6 additions & 2 deletions src/components/EthRequiredMessage.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div class="notification-content">
<div class="notification-text">
{{ $t('components.ethRequiredMessage.message', { nativeAsset }) }}
{{ $t(`components.ethRequiredMessage.message_${action}`, { nativeAsset }) }}
</div>
<router-link :to="accountUrl" class="btn btn-option get-eth-btn">
{{ $t('components.ethRequiredMessage.getETH', { nativeAsset }) }}
Expand All @@ -14,7 +14,11 @@ import { mapGetters } from 'vuex'
import { getNativeAsset, getFeeAsset } from '@liquality/wallet-core/dist/src/utils/asset'
export default {
props: {
accountId: String
accountId: String,
action: {
type: String,
default: 'swap'
}
},
computed: {
...mapGetters(['accountItem', 'client', 'suggestedFeePrices']),
Expand Down
2 changes: 1 addition & 1 deletion src/views/Send/Send.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
{{ $t('common.send') }}
</NavBar>
<InfoNotification v-if="nativeAssetRequired">
<EthRequiredMessage :account-id="account.id" />
<EthRequiredMessage :account-id="account.id" :action="'send'" />
</InfoNotification>
<div class="wrapper form">
<div class="wrapper_top">
Expand Down
2 changes: 1 addition & 1 deletion src/views/Swap/Swap.vue
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
<CannotCoverMinimumMessage :asset="asset" :account-id="account.id" />
</InfoNotification>
<InfoNotification v-else-if="ethRequired && !insufficientFundsError">
<EthRequiredMessage :account-id="account.id" />
<EthRequiredMessage :account-id="account.id" :action="'swap'" />
</InfoNotification>
<div class="wrapper form">
<div class="wrapper_top">
Expand Down

0 comments on commit e4f2e72

Please sign in to comment.