forked from Qortal/qortal-ui
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
68 lines
1.7 KiB
68 lines
1.7 KiB
2 years ago
|
'use strict'
|
||
|
import TransactionBase from '../TransactionBase.js'
|
||
|
import { QORT_DECIMALS } from '../../constants.js'
|
||
2 years ago
|
|
||
|
export default class GroupBanTransaction extends TransactionBase {
|
||
2 years ago
|
constructor() {
|
||
|
super()
|
||
|
this.type = 26
|
||
|
}
|
||
2 years ago
|
|
||
2 years ago
|
render(html) {
|
||
|
return html`
|
||
|
${this._banMemberDialog1}
|
||
|
<div style="background: #eee; padding: 8px; margin: 8px 0; border-radius: 5px;">
|
||
|
<span style="color: #000;">${this.theRecipient}</span>
|
||
|
</div>
|
||
|
${this._banMemberDialog2}
|
||
|
`
|
||
|
}
|
||
2 years ago
|
|
||
2 years ago
|
set banMemberDialog1(banMemberDialog1) {
|
||
|
this._banMemberDialog1 = banMemberDialog1
|
||
|
}
|
||
2 years ago
|
|
||
2 years ago
|
set banMemberDialog2(banMemberDialog2) {
|
||
|
this._banMemberDialog2 = banMemberDialog2
|
||
|
}
|
||
2 years ago
|
|
||
2 years ago
|
set rGroupId(rGroupId) {
|
||
|
this._rGroupId = rGroupId
|
||
|
this._rGroupIdBytes = this.constructor.utils.int32ToBytes(this._rGroupId)
|
||
|
}
|
||
2 years ago
|
|
||
2 years ago
|
set rBanReason(rBanReason) {
|
||
|
this._rBanReason = rBanReason
|
||
|
this._rBanReasonBytes = this.constructor.utils.stringtoUTF8Array(this._rBanReason.toLocaleLowerCase())
|
||
|
this._rBanReasonLength = this.constructor.utils.int32ToBytes(this._rBanReasonBytes.length)
|
||
|
}
|
||
2 years ago
|
|
||
2 years ago
|
set rBanTime(rBanTime) {
|
||
|
this._rBanTime = rBanTime
|
||
|
this._rBanTimeBytes = this.constructor.utils.int32ToBytes(this._rBanTime)
|
||
|
}
|
||
2 years ago
|
|
||
2 years ago
|
set recipient(recipient) {
|
||
|
this._recipient = recipient instanceof Uint8Array ? recipient : this.constructor.Base58.decode(recipient)
|
||
|
this.theRecipient = recipient
|
||
|
}
|
||
2 years ago
|
|
||
2 years ago
|
set fee(fee) {
|
||
|
this._fee = fee * QORT_DECIMALS
|
||
|
this._feeBytes = this.constructor.utils.int64ToBytes(this._fee)
|
||
|
}
|
||
2 years ago
|
|
||
2 years ago
|
get params() {
|
||
|
const params = super.params
|
||
|
params.push(
|
||
|
this._rGroupIdBytes,
|
||
|
this._recipient,
|
||
|
this._rBanReasonLength,
|
||
|
this._rBanReasonBytes,
|
||
|
this._rBanTimeBytes,
|
||
|
this._feeBytes
|
||
|
)
|
||
|
return params
|
||
|
}
|
||
|
}
|