Qortal UI - Main Code Repository A User Interface for the Qortal Blockchain Project. Truly decentralized web hosting, application hosting, communications, data storage, and full infrastructure for the future global decentralized digital world.
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.

64 lines
1.8 KiB

3 years ago
"use strict";
import TransactionBase from "../TransactionBase.js"
3 years ago
import { QORT_DECIMALS } from "../../constants.js"
3 years ago
export default class LeaveGroupTransaction extends TransactionBase {
constructor() {
super()
this.type = 32
this.tests.push(
() => {
if (!(this._registrantAddress instanceof Uint8Array && this._registrantAddress.length == 25)) {
return "Invalid Registrant " + Base58.encode(this._registrantAddress)
}
return true
}
)
}
render(html) {
return html`
${this._groupdialog3}
3 years ago
<div style="background: #eee; padding: 8px; margin: 8px 0; border-radius: 5px;">
<span style="color: #000;">${this._rGroupName}</span>
3 years ago
</div>
${this._groupdialog4}
3 years ago
`
}
set groupdialog3(groupdialog3) {
this._groupdialog3 = groupdialog3
}
set groupdialog4(groupdialog4) {
this._groupdialog4 = groupdialog4
}
3 years ago
set fee(fee) {
this._fee = fee * QORT_DECIMALS
this._feeBytes = this.constructor.utils.int64ToBytes(this._fee)
}
3 years ago
set registrantAddress(registrantAddress) {// Always Base58 encoded. Accepts Uint8Array or Base58 string.
this._registrantAddress = registrantAddress instanceof Uint8Array ? registrantAddress : this.constructor.Base58.decode(registrantAddress);
}
set rGroupId(rGroupId) {
this._rGroupId = rGroupId;
this._rGroupIdBytes = this.constructor.utils.int32ToBytes(this._rGroupId)
}
set rGroupName(rGroupName) {
this._rGroupName = rGroupName;
}
get params() {
const params = super.params;
params.push(
this._rGroupIdBytes,
this._feeBytes
)
return params;
}
}