diff --git a/app/background/node/service.js b/app/background/node/service.js index 93c3d481c..6d0af1719 100644 --- a/app/background/node/service.js +++ b/app/background/node/service.js @@ -6,7 +6,7 @@ import fs from 'fs'; import crypto from 'crypto'; import EventEmitter from 'events'; import throttle from 'lodash.throttle'; -import { NodeClient } from 'hs-client'; +import { NodeClient } from 'hsd/lib/client'; import { BigNumber } from 'bignumber.js'; import { ConnectionTypes, getConnection, getCustomRPC } from '../connections/service'; import FullNode from 'hsd/lib/node/fullnode'; @@ -237,6 +237,7 @@ export class NodeService extends EventEmitter { listen: this.networkName === 'regtest', // improves remote rpc dev/testing chainMigrate: 3, walletMigrate: 2, + walletIcannlockup: true, maxOutbound: 4, compactTreeOnInit: true, }); diff --git a/app/background/wallet/service.js b/app/background/wallet/service.js index 9a060dad8..2286fb508 100644 --- a/app/background/wallet/service.js +++ b/app/background/wallet/service.js @@ -1,4 +1,4 @@ -import { WalletClient } from 'hs-client'; +import { WalletClient } from 'hsd/lib/client'; import BigNumber from 'bignumber.js'; import crypto from 'crypto'; const secp256k1 = require('bcrypto/lib/secp256k1'); diff --git a/app/pages/Auction/BidActionPanel/Reserved.js b/app/pages/Auction/BidActionPanel/Reserved.js index 472875b5b..609657709 100644 --- a/app/pages/Auction/BidActionPanel/Reserved.js +++ b/app/pages/Auction/BidActionPanel/Reserved.js @@ -1,26 +1,46 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; +import { shell } from 'electron'; import { AuctionPanel, } from '../../../components/AuctionPanel'; -import {I18nContext} from "../../../utils/i18n"; +import { I18nContext } from "../../../utils/i18n"; export default class Reserved extends Component { static propTypes = { domain: PropTypes.object.isRequired, name: PropTypes.string.isRequired, + locked: PropTypes.bool.isRequired, }; static contextType = I18nContext; render() { + const { t } = this.context; + const { locked } = this.props; + return (
- {this.context.t('reservedText')} + {locked ? t('lockedText') : t('reservedText')}
- {this.context.t('reservedTimestamp')} + {locked ? + <> + + {t('lockedDescription')} + +

+ shell.openExternal(t('lockedLearnMoreURL'))} + > + {t('learnMore')} + +

+ + : t('reservedTimestamp') + }
); diff --git a/app/pages/Auction/BidActionPanel/index.js b/app/pages/Auction/BidActionPanel/index.js index 0cf0c1cf0..f4b4a10c1 100644 --- a/app/pages/Auction/BidActionPanel/index.js +++ b/app/pages/Auction/BidActionPanel/index.js @@ -3,7 +3,7 @@ import PropTypes from 'prop-types'; import { withRouter } from 'react-router'; import { connect } from 'react-redux'; import c from 'classnames'; -import { isAvailable, isBidding, isClosed, isOpening, isReserved, isReveal } from '../../../utils/nameHelpers'; +import { isAvailable, isBidding, isClosed, isOpening, isReserved, isLockedUp, isReveal } from '../../../utils/nameHelpers'; import * as watchingActions from '../../../ducks/watching'; import OpenBid from './OpenBid'; import BidNow from './BidNow'; @@ -81,9 +81,10 @@ class BidActionPanel extends Component { renderActionPanel() { const {domain} = this.props; const name = this.props.match.params.name; + const locked = isLockedUp(domain); - if (isReserved(domain)) { - return ; + if (isReserved(domain) || locked) { + return ; } if (this.isOwned()) { diff --git a/app/pages/Auction/domains.scss b/app/pages/Auction/domains.scss index 6e6ffd052..2ac267157 100644 --- a/app/pages/Auction/domains.scss +++ b/app/pages/Auction/domains.scss @@ -86,6 +86,7 @@ font-size: 1.25rem; font-weight: 600; padding: .4rem 0 .2rem; + text-transform: capitalize; } &__description { diff --git a/app/pages/Auction/index.js b/app/pages/Auction/index.js index 5c623f943..bfd5b6524 100644 --- a/app/pages/Auction/index.js +++ b/app/pages/Auction/index.js @@ -17,6 +17,7 @@ import { isComingSoon, isOpening, isReserved, + isLockedUp, isReveal, } from '../../utils/nameHelpers'; import BidActionPanel from './BidActionPanel'; @@ -138,7 +139,7 @@ export default class Auction extends Component { renderAuctionRight = () => { const {domain} = this.props; - if (isReserved(domain)) { + if (isReserved(domain) || isLockedUp(domain)) { return ; } @@ -273,7 +274,7 @@ export default class Auction extends Component { return (
{title}:
-
{content}
+
{content?.toLowerCase?.()}
{description}
); @@ -313,6 +314,8 @@ export default class Auction extends Component { {t('reservedCTAText')} ); + } else if (isLockedUp(domain)) { + status = t('locked'); } else if (isOpening(domain)) { status = t('opening'); description = t('biddingSoon'); diff --git a/app/utils/nameHelpers.js b/app/utils/nameHelpers.js index 5292a41d5..2966ff80c 100644 --- a/app/utils/nameHelpers.js +++ b/app/utils/nameHelpers.js @@ -25,7 +25,7 @@ export const isAvailable = name => { return false; } - if (start.reserved) { + if (start.reserved || start.locked) { return false; } @@ -61,6 +61,26 @@ export const isReserved = name => { return !!start.reserved; }; +export const isLockedUp = name => { + const {start} = name || {}; + const {info} = name || {}; + + // Maybe already claimed + if (isClosed(name)) + return false; + + // Not available if start is undefined + if (!start) { + return false; + } + + if (info) { + return false; + } + + return !!start.locked; +} + export const isOpening = name => checkState(name, states.OPENING); export const isBidding = name => checkState(name, states.BIDDING); export const isReveal = name => checkState(name, states.REVEAL); diff --git a/locales/en.json b/locales/en.json index 204614fd5..75fb3d7fa 100644 --- a/locales/en.json +++ b/locales/en.json @@ -213,6 +213,9 @@ "loadingBalance": "Loading balance...", "loadingNDomains": "Loading %s domains...", "locked": "LOCKED", + "lockedDescription": "The Handshake network activated a soft fork in 2023 that locked a subset of the reserved names to remain locked up (unavailable for auction) till 2028.", + "lockedLearnMoreURL": "https://heytx.substack.com/p/the-happening-event-for-handshake", + "lockedText": "Locked by the ICANN Soft Fork", "locktime": "Locktime", "lockup": "Lockup", "logDownloadSuccess": "Log file saved to %s.", diff --git a/package-lock.json b/package-lock.json index 142bfbc11..87950bff7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -27,8 +27,7 @@ "hdns": "0.8.0", "history": "4.10.1", "hs-airdrop": "0.10.0", - "hs-client": "github:handshake-org/hs-client#v0.0.13", - "hsd": "github:handshake-org/hsd#v5.0.1", + "hsd": "github:handshake-org/hsd#v6.1.1", "hsd-ledger": "github:handshake-org/hsd-ledger#v2.0.2", "isomorphic-fetch": "3.0.0", "jsonschema": "1.4.1", @@ -48,7 +47,7 @@ "redux-thunk": "2.4.2", "sass": "1.57.1", "semver": "7.3.8", - "shakedex": "0.0.18", + "shakedex": "0.0.19", "source-map-support": "0.5.21", "uuid": "9.0.0", "winston": "3.8.2" @@ -3561,11 +3560,20 @@ "license": "MIT" }, "node_modules/bcfg": { - "version": "0.1.7", - "license": "MIT", + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/bcfg/-/bcfg-0.2.2.tgz", + "integrity": "sha512-xa7hYK8ZgEV/Wjh+EJiKLLd+h8A0HGyhyntNMvKCeXIGepLqKUL3KYOE5zFz8EBv8sS3XruD5YPmYIjtwFOrZA==", "dependencies": { - "bsert": "~0.0.10" + "bsert": "~0.0.12" }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/bcfg/node_modules/bsert": { + "version": "0.0.12", + "resolved": "https://registry.npmjs.org/bsert/-/bsert-0.0.12.tgz", + "integrity": "sha512-lUB0EMu4KhIf+VQ6RZJ7J3dFdohYSeta+gNgDi00Hi/t3k/W6xZlwm9PSSG0q7hJ2zW9Rsn5yaMPymETxroTRw==", "engines": { "node": ">=8.0.0" } @@ -3627,8 +3635,9 @@ } }, "node_modules/bfile": { - "version": "0.2.2", - "license": "MIT", + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/bfile/-/bfile-0.2.3.tgz", + "integrity": "sha512-BhbmCLqDC+u8rPSeB/I8bRC8luQoUt+wD326CECXYXtE5GyTWL/q/OkNp58aH7XEREguEItvqM18s9vXLvg6fw==", "engines": { "node": ">=8.0.0" } @@ -4278,11 +4287,12 @@ } }, "node_modules/bweb": { - "version": "0.1.12", - "license": "MIT", + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/bweb/-/bweb-0.2.0.tgz", + "integrity": "sha512-JfpXemYqylNySwrhR7b4HZTrxnDhbOzNiIXCPBVQU6O8rTZ1wFDLFDr/7uQqkwzjyNZ4ZWTp5wP/pJY2IizfDA==", "dependencies": { "bsert": "~0.0.10", - "bsock": "~0.1.8" + "bsock": "~0.1.9" }, "bin": { "bweb": "bin/bweb" @@ -7490,36 +7500,18 @@ "node": ">=8.0.0" } }, - "node_modules/hs-client": { - "version": "0.0.13", - "resolved": "git+ssh://git@github.com/handshake-org/hs-client.git#84f79c5fb2914b12058672941ec87f3b7cd18074", - "license": "MIT", - "dependencies": { - "bcfg": "~0.1.7", - "bcurl": "~0.2.0", - "bsert": "~0.0.10" - }, - "bin": { - "hsd-cli": "bin/hsd-cli", - "hsd-rpc": "bin/hsd-rpc", - "hsw-cli": "bin/hsw-cli", - "hsw-rpc": "bin/hsw-rpc" - }, - "engines": { - "node": ">=8.0.0" - } - }, "node_modules/hsd": { - "version": "5.0.1", - "resolved": "git+ssh://git@github.com/handshake-org/hsd.git#66d9e3ca025c39ad076ce6972cdd55925ada0c7f", + "version": "6.1.1", + "resolved": "git+ssh://git@github.com/handshake-org/hsd.git#8a4da8ca939deafb9fcfd8a732e4c16870f278f7", "license": "MIT", "dependencies": { - "bcfg": "~0.1.7", + "bcfg": "~0.2.1", "bcrypto": "~5.4.0", + "bcurl": "^0.2.0", "bdb": "~1.4.0", "bdns": "~0.1.5", "bevent": "~0.1.5", - "bfile": "~0.2.2", + "bfile": "~0.2.3", "bfilter": "~1.0.5", "bheep": "~0.1.5", "binet": "~0.3.7", @@ -7528,19 +7520,18 @@ "blst": "~0.1.5", "bmutex": "~0.1.6", "bns": "~0.15.0", - "bsert": "~0.0.10", + "bsert": "~0.0.12", "bsock": "~0.1.9", "bsocks": "~0.2.6", "btcp": "~0.1.5", "buffer-map": "~0.0.7", "bufio": "~1.2.0", "bupnp": "~0.2.6", - "bval": "~0.1.6", - "bweb": "~0.1.11", + "bval": "~0.1.8", + "bweb": "~0.2.0", "goosig": "~0.10.0", - "hs-client": "~0.0.13", "n64": "~0.2.10", - "urkel": "~1.0.2" + "urkel": "~1.0.3" }, "bin": { "hs-seeder": "bin/hs-seeder", @@ -7548,8 +7539,10 @@ "hsd": "bin/hsd", "hsd-cli": "bin/hsd-cli", "hsd-node": "bin/node", + "hsd-rpc": "bin/hsd-rpc", "hsd-spvnode": "bin/spvnode", - "hsw-cli": "bin/hsw-cli" + "hsw-cli": "bin/hsw-cli", + "hsw-rpc": "bin/hsw-rpc" }, "engines": { "node": ">=14.0.0" @@ -7589,6 +7582,14 @@ "node": ">=8.0.0" } }, + "node_modules/hsd/node_modules/bsert": { + "version": "0.0.12", + "resolved": "https://registry.npmjs.org/bsert/-/bsert-0.0.12.tgz", + "integrity": "sha512-lUB0EMu4KhIf+VQ6RZJ7J3dFdohYSeta+gNgDi00Hi/t3k/W6xZlwm9PSSG0q7hJ2zW9Rsn5yaMPymETxroTRw==", + "engines": { + "node": ">=8.0.0" + } + }, "node_modules/hsd/node_modules/bufio": { "version": "1.2.0", "license": "MIT", @@ -7596,6 +7597,17 @@ "node": ">=8.0.0" } }, + "node_modules/hsd/node_modules/bval": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/bval/-/bval-0.1.8.tgz", + "integrity": "sha512-38WQyq94sgKaJbHSmkOwZqba6Ac0KIKPO0SMDNg/mCcwUos2NIrMg5Bb2LkzIer+RzS186IYusNeSrJrKdaqhA==", + "dependencies": { + "bsert": "~0.0.10" + }, + "engines": { + "node": ">=8.0.0" + } + }, "node_modules/html-element-map": { "version": "1.3.1", "dev": true, @@ -11480,8 +11492,9 @@ } }, "node_modules/shakedex": { - "version": "0.0.18", - "license": "MIT", + "version": "0.0.19", + "resolved": "https://registry.npmjs.org/shakedex/-/shakedex-0.0.19.tgz", + "integrity": "sha512-s5Wjz2aTvOiT+6cQAqAJ7NtVZi/mrB9eANicTNs5yMeG0ecpIFrwBwxS1vbAwZlQeW0DJ+YgvnCtzNf0OZxpQw==", "dependencies": { "bcrypto": "5.4.0", "bcurl": "^0.1.9", @@ -15607,9 +15620,18 @@ "dev": true }, "bcfg": { - "version": "0.1.7", + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/bcfg/-/bcfg-0.2.2.tgz", + "integrity": "sha512-xa7hYK8ZgEV/Wjh+EJiKLLd+h8A0HGyhyntNMvKCeXIGepLqKUL3KYOE5zFz8EBv8sS3XruD5YPmYIjtwFOrZA==", "requires": { - "bsert": "~0.0.10" + "bsert": "~0.0.12" + }, + "dependencies": { + "bsert": { + "version": "0.0.12", + "resolved": "https://registry.npmjs.org/bsert/-/bsert-0.0.12.tgz", + "integrity": "sha512-lUB0EMu4KhIf+VQ6RZJ7J3dFdohYSeta+gNgDi00Hi/t3k/W6xZlwm9PSSG0q7hJ2zW9Rsn5yaMPymETxroTRw==" + } } }, "bcrypto": { @@ -15647,7 +15669,9 @@ } }, "bfile": { - "version": "0.2.2" + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/bfile/-/bfile-0.2.3.tgz", + "integrity": "sha512-BhbmCLqDC+u8rPSeB/I8bRC8luQoUt+wD326CECXYXtE5GyTWL/q/OkNp58aH7XEREguEItvqM18s9vXLvg6fw==" }, "bfilter": { "version": "1.0.5", @@ -16071,10 +16095,12 @@ } }, "bweb": { - "version": "0.1.12", + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/bweb/-/bweb-0.2.0.tgz", + "integrity": "sha512-JfpXemYqylNySwrhR7b4HZTrxnDhbOzNiIXCPBVQU6O8rTZ1wFDLFDr/7uQqkwzjyNZ4ZWTp5wP/pJY2IizfDA==", "requires": { "bsert": "~0.0.10", - "bsock": "~0.1.8" + "bsock": "~0.1.9" } }, "bytes": { @@ -18182,25 +18208,17 @@ "goosig": "~0.10.0" } }, - "hs-client": { - "version": "git+ssh://git@github.com/handshake-org/hs-client.git#84f79c5fb2914b12058672941ec87f3b7cd18074", - "from": "hs-client@github:handshake-org/hs-client#v0.0.13", - "requires": { - "bcfg": "~0.1.7", - "bcurl": "~0.2.0", - "bsert": "~0.0.10" - } - }, "hsd": { - "version": "git+ssh://git@github.com/handshake-org/hsd.git#66d9e3ca025c39ad076ce6972cdd55925ada0c7f", - "from": "hsd@github:handshake-org/hsd#v5.0.1", + "version": "git+ssh://git@github.com/handshake-org/hsd.git#8a4da8ca939deafb9fcfd8a732e4c16870f278f7", + "from": "hsd@github:handshake-org/hsd#v6.1.1", "requires": { - "bcfg": "~0.1.7", + "bcfg": "~0.2.1", "bcrypto": "~5.4.0", + "bcurl": "^0.2.0", "bdb": "~1.4.0", "bdns": "~0.1.5", "bevent": "~0.1.5", - "bfile": "~0.2.2", + "bfile": "~0.2.3", "bfilter": "~1.0.5", "bheep": "~0.1.5", "binet": "~0.3.7", @@ -18209,23 +18227,35 @@ "blst": "~0.1.5", "bmutex": "~0.1.6", "bns": "~0.15.0", - "bsert": "~0.0.10", + "bsert": "~0.0.12", "bsock": "~0.1.9", "bsocks": "~0.2.6", "btcp": "~0.1.5", "buffer-map": "~0.0.7", "bufio": "~1.2.0", "bupnp": "~0.2.6", - "bval": "~0.1.6", - "bweb": "~0.1.11", + "bval": "~0.1.8", + "bweb": "~0.2.0", "goosig": "~0.10.0", - "hs-client": "~0.0.13", "n64": "~0.2.10", - "urkel": "~1.0.2" + "urkel": "~1.0.3" }, "dependencies": { + "bsert": { + "version": "0.0.12", + "resolved": "https://registry.npmjs.org/bsert/-/bsert-0.0.12.tgz", + "integrity": "sha512-lUB0EMu4KhIf+VQ6RZJ7J3dFdohYSeta+gNgDi00Hi/t3k/W6xZlwm9PSSG0q7hJ2zW9Rsn5yaMPymETxroTRw==" + }, "bufio": { "version": "1.2.0" + }, + "bval": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/bval/-/bval-0.1.8.tgz", + "integrity": "sha512-38WQyq94sgKaJbHSmkOwZqba6Ac0KIKPO0SMDNg/mCcwUos2NIrMg5Bb2LkzIer+RzS186IYusNeSrJrKdaqhA==", + "requires": { + "bsert": "~0.0.10" + } } } }, @@ -20628,7 +20658,9 @@ } }, "shakedex": { - "version": "0.0.18", + "version": "0.0.19", + "resolved": "https://registry.npmjs.org/shakedex/-/shakedex-0.0.19.tgz", + "integrity": "sha512-s5Wjz2aTvOiT+6cQAqAJ7NtVZi/mrB9eANicTNs5yMeG0ecpIFrwBwxS1vbAwZlQeW0DJ+YgvnCtzNf0OZxpQw==", "requires": { "bcrypto": "5.4.0", "bcurl": "^0.1.9", diff --git a/package.json b/package.json index 844f3c28c..789edb66e 100644 --- a/package.json +++ b/package.json @@ -153,8 +153,7 @@ "hdns": "0.8.0", "history": "4.10.1", "hs-airdrop": "0.10.0", - "hs-client": "github:handshake-org/hs-client#v0.0.13", - "hsd": "github:handshake-org/hsd#v5.0.1", + "hsd": "github:handshake-org/hsd#v6.1.1", "hsd-ledger": "github:handshake-org/hsd-ledger#v2.0.2", "isomorphic-fetch": "3.0.0", "jsonschema": "1.4.1", @@ -174,7 +173,7 @@ "redux-thunk": "2.4.2", "sass": "1.57.1", "semver": "7.3.8", - "shakedex": "0.0.18", + "shakedex": "0.0.19", "source-map-support": "0.5.21", "uuid": "9.0.0", "winston": "3.8.2"