Skip to content

Commit

Permalink
fix(AENS): auction end block calculation (#746)
Browse files Browse the repository at this point in the history
* fix(AENS): auction end block calculation

* chore(build): Update node to 5.0.2
  • Loading branch information
nduchak authored Nov 4, 2019
1 parent d2c8d0f commit 5709e40
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
TAG=v5.0.0-rc.5
TAG=v5.0.2
COMPILER_TAG=v4.0.0
1 change: 0 additions & 1 deletion es/ae/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ async function spend (amount, recipientId, options = {}) {

/**
* Resolve AENS name and return name hash
*
* @param {String} nameOrAddress
* @param verify
* @return {String} Address or AENS name hash
Expand Down
6 changes: 3 additions & 3 deletions es/tx/builder/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -297,9 +297,9 @@ export function computeBidFee (domain, startFee = NAME_FEE, increment = NAME_FEE

export function computeAuctionEndBlock (domain, claimHeight) {
return R.cond([
[R.lt(4), R.always(NAME_BID_TIMEOUTS[1] + claimHeight)],
[R.lt(8), R.always(NAME_BID_TIMEOUTS[4] + claimHeight)],
[R.lte(NAME_BID_MAX_LENGTH), R.always(NAME_BID_TIMEOUTS[8] + claimHeight)],
[R.lt(5), R.always(NAME_BID_TIMEOUTS[4] + claimHeight)],
[R.lt(9), R.always(NAME_BID_TIMEOUTS[8] + claimHeight)],
[R.lte(NAME_BID_MAX_LENGTH), R.always(NAME_BID_TIMEOUTS[12] + claimHeight)],
[R.T, R.always(claimHeight)]
])(domain.replace('.chain', '').length)
}
Expand Down
6 changes: 3 additions & 3 deletions es/tx/builder/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ export const NAME_BID_RANGES = {
// # name bid timeouts
export const NAME_BID_TIMEOUTS = {
13: 0,
8: NAME_BID_TIMEOUT_BLOCKS, // # 480 blocks
4: 31 * NAME_BID_TIMEOUT_BLOCKS, // # 14880 blocks
1: 62 * NAME_BID_TIMEOUT_BLOCKS // # 29760 blocks
12: NAME_BID_TIMEOUT_BLOCKS, // # 480 blocks
8: 31 * NAME_BID_TIMEOUT_BLOCKS, // # 14880 blocks
4: 62 * NAME_BID_TIMEOUT_BLOCKS // # 29760 blocks
}

// # Tag constant for ids (type uint8)
Expand Down

0 comments on commit 5709e40

Please sign in to comment.