I want to be able to load a raw transaction into a transaction builder process (the tx is constructed elsewhere).
What needs to be done:
function load_tx(tx) {
var txbuilder = bitshares_js.TransactionBuilder;
var ops = bitshares_js.serializer.ops
var tr = new txbuilder()
// I need to do this manually, this is usually done in `finalize` but then it replaces the expiration, and ref_block_* parameters, which i want to pass over manually!!!
tr.tr_buffer = ops.transaction.toBuffer(tx);
// load stuff outside operations
tr.expiration = tx.expiration;
tr.ref_block_num = tx.ref_block_num;
tr.ref_block_prefix = tx.ref_block_prefix;
//load operations
for (var i=0; i< tx.operations.length; ++i) {
tr.add_operation(tx.operations[i]);
}
return tx
}
I want to be able to load a raw transaction into a transaction builder process (the tx is constructed elsewhere).
What needs to be done: