fix: Infinite Loop on Transaction List

This commit is contained in:
Moriz Wahl 2021-07-08 17:45:38 +02:00
parent 3dd10b3a30
commit 7071a08081

View File

@ -56,42 +56,30 @@
</div>
</template>
<script>
export default {
name: 'DecayInformation',
props: {
decay: {
balance: '',
decay_duration: '',
decay_start: 0,
decay_end: 0,
decay_start_block: 0,
},
decaytyp: { type: String, default: '' },
},
data() {
return {
a: 0,
b: 0,
duration: {},
diff: {},
}
},
computed: {
decayStartBlockTextShort() {
return this.decay.decay_start_block
? ' - Startblock Decay am: ' + this.$d(this.$moment.unix(this.decay.decay_start_block))
: ''
},
},
methods: {
getDuration(start, end) {
this.a = new Date(start)
this.b = new Date(end)
this.a = this.$moment.unix(this.a)
this.b = this.$moment.unix(this.b)
this.diff = this.$moment.duration(this.a.diff(this.b))
this.duration = this.diff._data
},
},
}
export default {
name: 'DecayInformation',
props: {
decay: {
balance: '',
decay_duration: '',
decay_start: 0,
decay_end: 0,
decay_start_block: 0,
},
decaytyp: { type: String, default: '' },
},
computed: {
decayStartBlockTextShort() {
return this.decay.decay_start_block
? ' - Startblock Decay am: ' + this.$d(this.$moment.unix(this.decay.decay_start_block))
: ''
},
getDuration() {
const startDate = new Date(this.decay.decay_start)
const endDate = new Date(this.decay.decay_end)
const diff = this.$moment.duration(startDate.diff(endDate))
return diff._data
},
},
}
</script>