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.
46 lines
862 B
46 lines
862 B
3 years ago
|
/**
|
||
|
* CrossChain - TradeBot Respond Request (Buy Action)
|
||
|
*
|
||
|
* These are special types of transactions (JSON ENCODED)
|
||
|
*/
|
||
|
|
||
|
export default class TradeBotRespondRequest {
|
||
|
constructor() {
|
||
|
// ...
|
||
|
}
|
||
|
|
||
|
createTransaction(txnReq) {
|
||
|
|
||
|
this.atAddress(txnReq.atAddress)
|
||
|
|
||
|
this.foreignKey(txnReq.foreignKey)
|
||
|
|
||
|
this.receivingAddress(txnReq.receivingAddress)
|
||
|
|
||
|
return this.txnRequest()
|
||
|
}
|
||
|
|
||
|
atAddress(atAddress) {
|
||
|
|
||
|
this._atAddress = atAddress
|
||
|
}
|
||
|
|
||
|
foreignKey(foreignKey) {
|
||
|
this._foreignKey = foreignKey
|
||
|
}
|
||
|
|
||
|
receivingAddress(receivingAddress) {
|
||
|
|
||
|
this._receivingAddress = receivingAddress
|
||
|
}
|
||
|
|
||
|
txnRequest() {
|
||
|
|
||
|
return {
|
||
|
atAddress: this._atAddress,
|
||
|
foreignKey: this._foreignKey,
|
||
|
receivingAddress: this._receivingAddress
|
||
|
}
|
||
|
}
|
||
|
}
|