2022-04-22 13:05:56 +10:00
|
|
|
<template>
|
|
|
|
<div class="modal-card box box-modal">
|
|
|
|
<header class="box-modal-header is-spaced">
|
|
|
|
<div class="box-modal-title">{{ $t('withdrawalSettings') }}</div>
|
|
|
|
<button type="button" class="delete" @click="$parent.cancel('escape')" />
|
|
|
|
</header>
|
2024-11-24 08:47:22 +00:00
|
|
|
<b-tabs v-model="withdrawType" :animated="false" class="is-modal">
|
2023-12-25 13:16:32 +00:00
|
|
|
<RelayerTab />
|
|
|
|
<WalletTab />
|
|
|
|
</b-tabs>
|
2022-04-22 13:05:56 +10:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
<script>
|
|
|
|
/* eslint-disable no-console */
|
|
|
|
import { mapState, mapMutations } from 'vuex'
|
|
|
|
|
2023-12-25 13:16:32 +00:00
|
|
|
import { RelayerTab, WalletTab } from '@/components/settings/tabs'
|
2022-04-22 13:05:56 +10:00
|
|
|
|
|
|
|
export default {
|
|
|
|
components: {
|
2023-12-25 13:16:32 +00:00
|
|
|
RelayerTab,
|
|
|
|
WalletTab
|
2022-04-22 13:05:56 +10:00
|
|
|
},
|
|
|
|
props: {
|
|
|
|
currency: {
|
|
|
|
type: String,
|
|
|
|
default: 'ETH'
|
|
|
|
},
|
|
|
|
title: {
|
|
|
|
type: String,
|
|
|
|
default: 'withdrawalSettings'
|
|
|
|
}
|
|
|
|
},
|
|
|
|
provide() {
|
|
|
|
return {
|
|
|
|
currency: this.currency,
|
|
|
|
save: this.save,
|
|
|
|
reset: this.reset
|
|
|
|
}
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
withdrawType: 'relayer'
|
|
|
|
}
|
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
...mapState('application', {
|
|
|
|
defaultWithdrawType: 'withdrawType'
|
2024-11-24 08:47:22 +00:00
|
|
|
})
|
2022-04-22 13:05:56 +10:00
|
|
|
},
|
|
|
|
created() {
|
|
|
|
this.withdrawType = this.defaultWithdrawType
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
...mapMutations('application', ['SET_WITHDRAW_TYPE']),
|
|
|
|
reset() {
|
|
|
|
this.withdrawType = 'relayer'
|
|
|
|
this.$root.$emit('resetSettings')
|
|
|
|
},
|
|
|
|
save() {
|
|
|
|
this.SET_WITHDRAW_TYPE({ withdrawType: this.withdrawType })
|
|
|
|
this.$emit('close')
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|