Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
_parseResponse (response) {
if (response.status === 204) {
return
}
const formatter = new Jsona({
DeserializeCache: DeserializeCacheStub
})
const parsed = formatter.deserialize(response.data)
this._data = toCamelCaseDeep(parsed)
}
allTasks: 1,
creatorDetails: '{"creator":"details"}'
}
let op = RedemptionRequestBuilder.redemptionRequest(opts)
let xdrOp = op.toXDR('hex')
let operation = xdr.Operation.fromXDR(Buffer.from(xdrOp, 'hex'))
let obj = Operation.operationToObject(operation)
expect(obj.type).to.be.equal(xdr.OperationType.createRedemptionRequest().name)
expect(obj.sourceBalanceId).to.be.equal(opts.sourceBalanceId)
expect(obj.destination).to.be.equal(opts.destination)
expect(obj.amount).to.be.equal(opts.amount)
expect(jsonStringify(obj.creatorDetails)).to.be.equal(opts.creatorDetails)
expect(obj.allTasks).to.be.equal(opts.allTasks)
})
})