Skip to content

Commit

Permalink
refactor(AENS): refactor claim (#709)
Browse files Browse the repository at this point in the history
* chrome(Release): Bump version 5.0.0. Regenerate docs

* chrome(Release): Prepare CHANGELOG. Regenerate lock file

* refactor(constants): Move const to shema. Improve isAddressValid.

* refactor(constants): Move const to shema. Improve isAddressValid.

* refactor(AENS): Remove `prelimaCommitmentId`. Add function for generating `nameId`

* refactor(AE): Generate nameId in spend by name function instead of calling node
  • Loading branch information
nduchak committed Nov 11, 2019
1 parent 1128bbd commit 6d4078e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 28 deletions.
27 changes: 0 additions & 27 deletions es/ae/aens.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,29 +32,6 @@ import { commitmentHash, isNameValid, getMinimumNameFee, classify } from '../tx/
import Ae from './'
import { CLIENT_TTL, NAME_FEE, NAME_TTL } from '../tx/builder/schema'

/**
* Transfer a domain to another account
* @instance
* @function
* @alias module:@aeternity/aepp-sdk/es/ae/aens
* @category async
* @param {String} nameId
* @param {String} account
* @param {Object} [options={}]
* @return {Promise<Object>}
*/
async function transfer (nameId, account, options = {}) {
const opt = R.merge(this.Ae.defaults, options)

const nameTransferTx = await this.nameTransferTx(R.merge(opt, {
nameId,
accountId: await this.address(opt),
recipientId: account
}))

return this.send(nameTransferTx, opt)
}

/**
* Revoke a domain
* @instance
Expand Down Expand Up @@ -233,10 +210,6 @@ async function preclaim (name, options = {}) {
})
}

async function bid (name, nameFee = NAME_FEE, options = {}) {
return this.aensClaim(name, 0, { ...options, nameFee, vsn: 2 })
}

/**
* Bid to name auction
* @instance
Expand Down
2 changes: 1 addition & 1 deletion es/utils/crypto.js
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ export function decodeBase64Check (str) {
/**
* Base58 encode given `input`
* @rtype (input: String) => String
* @param {String} input - Data to encode
* @param {String|Buffer} input - Data to encode
* @return {String} Base58 encoded data
*/
export function encodeBase58Check (input) {
Expand Down

0 comments on commit 6d4078e

Please sign in to comment.