diff --git a/src/transaction.js b/src/transaction.js index 1d53c82..cd1fcf1 100644 --- a/src/transaction.js +++ b/src/transaction.js @@ -19,7 +19,7 @@ export default class Transaction { const tx = clone(transaction) // TODO: set fulfillments to null // Sort the keys - return stableStringify(tx, (a, b) => (a.key > b.key ? 1 : -1)) + return stableStringify(this.tx, (a, b) => (a.key > b.key ? 1 : -1)) } makeInputTemplate(publicKeys = [], fulfills = null, fulfillment = null) { @@ -59,7 +59,7 @@ export default class Transaction { tx.outputs = outputs // Hashing must be done after, as the hash is of the Transaction (up to now) - tx.id = hashTransaction(tx) + tx.id = this.hashTransaction(tx) return tx } @@ -93,7 +93,7 @@ export default class Transaction { /** * @public - * Create an Ed25519 Cryptocondition from an Ed25519 public key + * Create an Ed25519 Cryptocondition from an Ed25519 public key * to put into an Output of a Transaction * @param {string} publicKey base58 encoded Ed25519 public key for the recipient of the Transaction * @param {boolean} [json=true] If true returns a json object otherwise a crypto-condition type