Wallet/js/models/core/BuilderMockV0.js
Esteban Ordano 00774b62fd Revert "Delete BuilderMockV0"
This is a combination of 3 commits:
* Revertion of commit b39a683339.
* Revertion of commit 61aea8db3d.
* Revertion of commit 5f666aef66.
2014-09-10 10:02:57 -03:00

26 lines
473 B
JavaScript

'use strict';
var bitcore = require('bitcore');
var Transaction = bitcore.Transaction;
function BuilderMockV0 (data) {
this.vanilla = data;
this.tx = new Transaction();
this.tx.parse(new Buffer(data.tx, 'hex'));
};
BuilderMockV0.prototype.build = function() {
return this.tx;
};
BuilderMockV0.prototype.getSelectedUnspent = function() {
return [];
};
BuilderMockV0.prototype.toObj = function() {
return this.vanilla;
};
module.exports = BuilderMockV0;