RPC tool: fix typos

This commit is contained in:
mDuo13
2021-11-24 16:00:02 -08:00
parent 0729c9e164
commit 80c922f919

View File

@@ -9,17 +9,20 @@ jQuery(function ($) {
const api = new xrpl.Client(FULL_HISTORY_SERVER) const api = new xrpl.Client(FULL_HISTORY_SERVER)
api.on('connected', () => { api.on('connected', () => {
const target = location.hash.slice(1); const target = location.hash.slice(1);
if (api.isValidAddress(target) if (xrpl.isValidAddress(target) ||
reTxId.exec(target) || reTxId.exec(target) ||
reLedgerSeq.exec(target)) { reLedgerSeq.exec(target)) {
$('#target').val(target); $('#target').val(target);
fetchTarget(target); fetchTarget(target);
} }
}) })
api.on('disconnected', (code) => console.warn("disconnected", code));
api.connect(); api.connect();
$('#account-entry').submit(function (e) { $('#account-entry').submit(function (e) {
e.preventDefault() e.preventDefault()
fetchTarget( $('#target').val() ) fetchTarget( $('#target').val() )
@@ -45,7 +48,7 @@ jQuery(function ($) {
$("#permalink").attr("href", locationWithoutHash + "#" + target); $("#permalink").attr("href", locationWithoutHash + "#" + target);
$("#explorerlink").attr("href", ""); // Reset $("#explorerlink").attr("href", ""); // Reset
if (api.isValidAddress(target)) { // Account ------------------------------- if (xrpl.isValidAddress(target)) { // Account ------------------------------
let account = target; let account = target;
previousMarkers = [] previousMarkers = []
nextMarker = undefined nextMarker = undefined