Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -312,10 +312,21 @@ <h1 data-locale="open_auction">Get .ton domains</h1>
</span>
</p>
<!-- GG INTEGRATION -->
<p id="betRestartPriceRow" class="row">
<span class="row__title" data-locale="bet_price">Bet price</span>
<span class="priceContainer">
<span id="restartMinBet" class="sale__price">---</span>
<span id="restartMinBetConverted" class="converted__price">---</span>
</span>
</p>
<p id="busyOwnerRow" class="row align__center">
<span data-locale="owner" class="row__title">Owner</span>
<span id="busyOwnerAddress" class="addr node__to__copy"></span>
</p>
<p id="restartInfoRow" class="row info__row">
<span data-locale="start_bid">The domain can be purchased at an open auction. To&nbsp;start
the auction, make the first bid.</span>
</p>
<div id="domainEditContainer">
<div class="edit-form">
<div id="editWalletRow" class="edit__row">
Expand Down Expand Up @@ -421,6 +432,14 @@ <h1 data-locale="open_auction">Get .ton domains</h1>
</span>
</a>
<!-- GG INTEGRATION -->
<!-- RESTART BUTTON -->
<button id="restartButton" class="btn">
<img src="/assets/hammer.svg" alt="Place bid">
<span data-locale="bid_to_start">
Place a bid to start the auction
</span>
</button>
<!-- RESTART BUTTON -->
<a id="infoBtn" class="btn outline" href="/about.html#claim-your-ton-domain" target="_blank">
<span data-locale="claim_your_domain">
What is Ton Domains?
Expand Down
23 changes: 23 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -529,12 +529,34 @@ const renderBusyDomain = (

const isDomainExpired = expiresDate.getTime() <= new Date().getTime();
if (isDomainExpired) {
domainType = FREE_DOMAIN_TYPE
const salePrice = TonWeb.utils.fromNano(getMinPrice(domain))
$('#betRestartPriceRow').style.display = 'flex';
$('#restartMinBet').innerText = formatNumber(salePrice, false)
attachPaymentModalListeners('restart', domain, salePrice, '#restartButton',domainItemAddress.toString(
true,
true,
true,
IS_TESTNET
))
$('#busyDomainYetToExpire').style.display = 'none';
$('#busyDomainAlreadyExpired').style.display = 'inline';
$('#restartInfoRow').style.display = 'inline';
$('#restartButton').style.display = 'inline-flex';
$('#busyDomainAlreadyExpired #expiredDate').innerText = formattedExpiryDate;
getCoinPrice().then((price) => {
if (price) {
$('#restartMinBetConverted').innerText = formatNumber(salePrice * price, 2)
}
}).catch((e) => {
console.error(e)
})
} else {
$('#busyDomainYetToExpire').style.display = 'inline';
$('#busyDomainAlreadyExpired').style.display = 'none';
$('#betRestartPriceRow').style.display = 'none';
$('#restartInfoRow').style.display = 'none';
$('#restartButton').style.display = 'none';
$('#expiresDate').innerText = formattedExpiryDate;
}
}
Expand Down Expand Up @@ -872,6 +894,7 @@ function togglePaymentModal({
if (!payload) {
payload = modalType === 'renew' ?
await getChangeDnsRecordPayload(message) : await getAuctionBidPayload(message);
if(modalType === 'restart') payload = 'te6cckEBAQEADgAAGE7RS2UAAAAAAAAADacdAXI=='
}

const validUntil = Date.now() + validUntilTimeMS;
Expand Down