forked from tornadocash/classic-ui
allow wallet withdrawal if no relayers
This commit is contained in:
parent
820a651615
commit
d0cee4aa9a
@ -4,20 +4,25 @@
|
|||||||
<div class="box-modal-title">{{ $t('withdrawalSettings') }}</div>
|
<div class="box-modal-title">{{ $t('withdrawalSettings') }}</div>
|
||||||
<button type="button" class="delete" @click="$parent.cancel('escape')" />
|
<button type="button" class="delete" @click="$parent.cancel('escape')" />
|
||||||
</header>
|
</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 />
|
<RelayerTab />
|
||||||
</b-tabs>
|
</b-tabs>
|
||||||
|
<b-tabs v-else v-model="withdrawType" :animated="false" class="is-modal">
|
||||||
|
<RelayerTab />
|
||||||
|
<WalletTab />
|
||||||
|
</b-tabs>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
/* eslint-disable no-console */
|
/* eslint-disable no-console */
|
||||||
import { mapState, mapMutations } from 'vuex'
|
import { mapState, mapMutations } from 'vuex'
|
||||||
|
|
||||||
import { RelayerTab } from '@/components/settings/tabs'
|
import { RelayerTab, WalletTab } from '@/components/settings/tabs'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
RelayerTab
|
RelayerTab,
|
||||||
|
WalletTab
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
currency: {
|
currency: {
|
||||||
@ -44,7 +49,11 @@ export default {
|
|||||||
computed: {
|
computed: {
|
||||||
...mapState('application', {
|
...mapState('application', {
|
||||||
defaultWithdrawType: 'withdrawType'
|
defaultWithdrawType: 'withdrawType'
|
||||||
})
|
}),
|
||||||
|
...mapState('relayer', ['isLoadingRelayers', 'validRelayers']),
|
||||||
|
isRelayersAvailable() {
|
||||||
|
return !this.isLoadingRelayers && this.validRelayers.length > 0;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.withdrawType = this.defaultWithdrawType
|
this.withdrawType = this.defaultWithdrawType
|
||||||
|
@ -200,7 +200,7 @@ export default {
|
|||||||
return false
|
return false
|
||||||
},
|
},
|
||||||
shouldSettingsShow() {
|
shouldSettingsShow() {
|
||||||
return !this.hasErrorNote && !this.error.message
|
return !this.isLoading && !this.error.type && !this.hasErrorNote
|
||||||
},
|
},
|
||||||
hasErrorNote() {
|
hasErrorNote() {
|
||||||
const note = this.withdrawNote.split('-')[4]
|
const note = this.withdrawNote.split('-')[4]
|
||||||
|
Loading…
Reference in New Issue
Block a user