Skip to content

Commit

Permalink
Fix api docs generation
Browse files Browse the repository at this point in the history
  • Loading branch information
davidyuk committed Oct 26, 2020
1 parent 8e872b4 commit 56e3aa9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions es/tx/builder/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,11 @@ export function buildContractId (ownerId, nonce) {
* @alias module:@aeternity/aepp-sdk/es/tx/builder/helpers
* @param {String} prefix Transaction hash prefix
* @param {Buffer} data Rlp encoded transaction buffer
* @param {{ raw: boolean = false }} options Options
* @param {Object} options
* @param {Boolean} options.raw
* @return {String} Transaction hash
*/
export function buildHash (prefix, data, options = { raw: false }) {
export function buildHash (prefix, data, options = {}) {
return options.raw ? hash(data) : encode(hash(data), prefix)
}

Expand Down
5 changes: 3 additions & 2 deletions es/tx/builder/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -409,10 +409,11 @@ export function unpackTx (encodedTx, fromRlpBinary = false, prefix = 'tx') {
* @function
* @alias module:@aeternity/aepp-sdk/es/tx/builder
* @param {String | Buffer} rawTx base64 or rlp encoded transaction
* @param {{ raw: boolean = false }} options Options
* @param {Object} options
* @param {Boolean} options.raw
* @return {String} Transaction hash
*/
export function buildTxHash (rawTx, options = { raw: false }) {
export function buildTxHash (rawTx, options) {
if (typeof rawTx === 'string' && rawTx.indexOf('tx_') !== -1) return buildHash('th', unpackTx(rawTx).rlpEncoded, options)
return buildHash('th', rawTx, options)
}
Expand Down

0 comments on commit 56e3aa9

Please sign in to comment.