proposal 44 #29

Merged
Theo merged 9 commits from ButterflyEffect/classic-ui:development into master 2024-01-03 01:13:17 +03:00
2 changed files with 14 additions and 5 deletions
Showing only changes of commit d0cee4aa9a - Show all commits

@ -4,20 +4,25 @@
<div class="box-modal-title">{{ $t('withdrawalSettings') }}</div>
<button type="button" class="delete" @click="$parent.cancel('escape')" />
</header>
<b-tabs v-model="withdrawType" :animated="false" class="is-modal">
<b-tabs v-if="isRelayersAvailable" v-model="withdrawType" :animated="false" class="is-modal">
<RelayerTab />
</b-tabs>
<b-tabs v-else v-model="withdrawType" :animated="false" class="is-modal">
<RelayerTab />
<WalletTab />
</b-tabs>
</div>
</template>
<script>
/* eslint-disable no-console */
import { mapState, mapMutations } from 'vuex'
import { RelayerTab } from '@/components/settings/tabs'
import { RelayerTab, WalletTab } from '@/components/settings/tabs'
export default {
components: {
RelayerTab
RelayerTab,
WalletTab
},
props: {
currency: {
@ -44,7 +49,11 @@ export default {
computed: {
...mapState('application', {
defaultWithdrawType: 'withdrawType'
})
}),
...mapState('relayer', ['isLoadingRelayers', 'validRelayers']),
isRelayersAvailable() {
return !this.isLoadingRelayers && this.validRelayers.length > 0;
}
},
created() {
this.withdrawType = this.defaultWithdrawType

@ -200,7 +200,7 @@ export default {
return false
},
shouldSettingsShow() {
return !this.hasErrorNote && !this.error.message
return !this.isLoading && !this.error.type && !this.hasErrorNote
},
hasErrorNote() {
const note = this.withdrawNote.split('-')[4]