@shapeshiftoss/fiosdk
Version:
The Foundation for Interwallet Operability (FIO) is a consortium of leading blockchain wallets, exchanges and payments providers that seeks to accelerate blockchain adoption by reducing the risk, complexity, and inconvenience of sending and receiving cryp
35 lines (28 loc) • 991 B
text/typescript
import { SignedTransaction } from './SignedTransaction'
import { validationRules } from '../../utils/validation'
export class CancelFundsRequest extends SignedTransaction {
public ENDPOINT: string = 'chain/cancel_funds_request'
public ACTION: string = 'cancelfndreq'
public ACCOUNT: string = 'fio.reqobt'
public fioRequestId: number
public maxFee: number
public technologyProviderId: string
constructor(fioRequestId: number, maxFee: number, technologyProviderId: string = '') {
super()
this.fioRequestId = fioRequestId
this.maxFee = maxFee
this.technologyProviderId = technologyProviderId
this.validationData = { tpid: technologyProviderId || null }
this.validationRules = validationRules.cancelFundsRequestRules
}
public async getData() {
const actor = this.getActor()
const data = {
fio_request_id: this.fioRequestId,
actor,
tpid: this.technologyProviderId,
max_fee: this.maxFee,
}
return data
}
}