mirror of
https://github.com/Qortal/qortal-ui.git
synced 2025-07-29 21:21:23 +00:00
build
config
img
qortal-ui-core
qortal-ui-crypto
api
bitcoin
deps
transactions
arbitrary
chat
groups
names
reward-share
trade-portal
AirdropTransaction.js
DelegationTransaction.js
MessageTransaction.js
PaymentTransaction.js
PublicizeTransaction.js
TransactionBase.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
.editorconfig
.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
32 lines
1.0 KiB
JavaScript
32 lines
1.0 KiB
JavaScript
'use strict';
|
|
import TransactionBase from './TransactionBase.js'
|
|
// import { QORT_DECIMALS } from "../constants.js" // Not needed, no amount
|
|
|
|
export default class DelegationTransaction extends TransactionBase {
|
|
constructor () {
|
|
super()
|
|
this.type = 18
|
|
this.tests.push(
|
|
() => {
|
|
if (!(this._superNodeAddress instanceof Uint8Array && this._superNodeAddress.length == 25)) {
|
|
return 'Invalid recipient ' + Base58.encode(this._superNodeAddress)
|
|
}
|
|
return true
|
|
}
|
|
)
|
|
}
|
|
|
|
set superNodeAddress (superNodeAddress) { // Always Base58 encoded. Accepts Uint8Array or Base58 string.
|
|
this._superNodeAddress = superNodeAddress instanceof Uint8Array ? superNodeAddress : this.constructor.Base58.decode(superNodeAddress)
|
|
}
|
|
|
|
get params () {
|
|
const params = super.params
|
|
params.push(
|
|
this._superNodeAddress,
|
|
this._feeBytes
|
|
)
|
|
return params
|
|
}
|
|
}
|