Skip to content

Removed unnecessary storage field in domain manage tab #89

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
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
9 changes: 0 additions & 9 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -344,15 +344,6 @@ <h1 data-locale="open_auction">Get .ton domains</h1>
<div style="font-size: 14px"><input type="checkbox" id="siteStorage"><label
for="siteStorage" data-locale="storage_checkbox">Hosting in TON Storage</label></div>
</div>
<div id="editStorageRow" class="edit-row edit__row">
<div class="edit-label edit__label">
TON Storage
</div>
<input type="text" placeholder="HEX" class="default__input">
<div class="edit-btn edit__button">
<a data-locale="set" class="edit-btn">Save</a>
</div>
</div>
<div id="editResolverRow" class="edit__row">
<label class="edit__label" for="editResolverInput" data-locale="subdomains">
Subdomains
Expand Down
21 changes: 1 addition & 20 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1173,9 +1173,8 @@ const toggleManageDomainForm = async (domain, dnsItem) => {
$('#editWalletRow input').value = dnsRecordWallet
? dnsRecordWallet.toString(true, true, true, IS_TESTNET)
: ''
$('#editAdnlRow input').value = dnsRecordSite ? dnsRecordSite.toHex() : ''
$('#editAdnlRow input').value = isSiteInStorage ? (dnsRecordStorage ? dnsRecordStorage.toHex() : '') : (dnsRecordSite ? dnsRecordSite.toHex() : '')
$('#siteStorage').checked = isSiteInStorage
$('#editStorageRow input').value = dnsRecordStorage ? dnsRecordStorage.toHex() : ''
$('#editResolverRow input').value = dnsRecordResolver
? dnsRecordResolver.toString(true, true, true, IS_TESTNET)
: ''
Expand Down Expand Up @@ -1246,24 +1245,6 @@ const toggleManageDomainForm = async (domain, dnsItem) => {
setTx('#editAdnlRow', TonWeb.dns.DNS_CATEGORY_SITE, value ? record : null)
})

createEditBtn('#editStorageRow .edit-btn').addEventListener('click', () => {
const value = $('#editStorageRow input').value; // hex

let record = null;
if (value) {
try {
const bagId = new TonWeb.utils.StorageBagId(value);
record = TonWeb.dns.createStorageBagIdRecord(bagId);
} catch (e) {
console.error(e);
alert(store.localeDict.invalid_hex_address);
return;
}
}

setTx('#editStorageRow', TonWeb.dns.DNS_CATEGORY_STORAGE, value ? record : null);
});

$('#editResolverRow input').placeholder = store.localeDict.address

createEditBtn('#editResolverRow .edit__button').addEventListener(
Expand Down