mirror of
https://github.com/Qortal/qortal-ui.git
synced 2025-07-25 11:11:25 +00:00
build
config
img
lib
locales
qortal-ui-core
qortal-ui-crypto
api
bitcoin
deps
transactions
arbitrary
chat
groups
names
reward-share
trade-portal
AirdropTransaction.js
DelegationTransaction.js
DeployAtTransaction.js
MessageTransaction.js
PaymentTransaction.js
PublicizeTransaction.js
TransactionBase.js
TransferPrivsTransaction.js
arbitraryV3.js
processTransaction.js
registerName_dnsthing.js
transactions.js
utils
wallet
PhraseWallet.js
api.js
constants.js
createTransaction.js
createWallet.js
decryptStoredWallet.js
fetch-request.js
kdf.js
registerUsername.js
storeWallet.js
tradeRequest.js
api.js
api_deps.js
config.js
package.json
qortal-ui-plugins
scripts
snap
splash
.editorconfig
.eslintrc.json
.gitattributes
.gitignore
.travis.yml
CONTRIBUTING.md
LICENSE
README.md
build-setup.js
build.bat
build.js
build.sh
electron-builder.yml
electron.js
install-dependencies.sh
package.json
push-updates-with-travis-build.sh
run_server.bat
server.js
set-up-snap.sh
update-package-json.js
watch-inline.js
watch.js
43 lines
1.1 KiB
JavaScript
43 lines
1.1 KiB
JavaScript
'use strict'
|
|
import TransactionBase from './TransactionBase.js'
|
|
import Base58 from '../deps/Base58.js'
|
|
import { store } from '../../api.js'
|
|
import { QORT_DECIMALS } from '../constants.js'
|
|
|
|
export default class TransferPrivsTransaction extends TransactionBase {
|
|
constructor() {
|
|
super()
|
|
this.type = 40
|
|
}
|
|
|
|
render(html) {
|
|
const conf = store.getState().config
|
|
return html`
|
|
Are you sure to transfer privileges to this account ?
|
|
<div style="background: #eee; padding: 8px; margin: 8px 0; border-radius: 5px;">
|
|
<span style="color: #000;">${this.theRecipient}</span>
|
|
</div>
|
|
On pressing confirm, the transfer privileges request will be sent!
|
|
`
|
|
}
|
|
|
|
set recipient(recipient) {
|
|
this._recipient = recipient instanceof Uint8Array ? recipient : this.constructor.Base58.decode(recipient)
|
|
this.theRecipient = recipient
|
|
}
|
|
|
|
set fee(fee) {
|
|
this._fee = fee * QORT_DECIMALS
|
|
this._feeBytes = this.constructor.utils.int64ToBytes(this._fee)
|
|
}
|
|
|
|
get params() {
|
|
const params = super.params
|
|
params.push(
|
|
this._recipient,
|
|
this._feeBytes
|
|
)
|
|
return params
|
|
}
|
|
}
|