Workflow updating files of cronoswallet
This commit is contained in:
parent
3359d60683
commit
e7f94793c0
@ -767,7 +767,17 @@
|
|||||||
const TRANSACTIONS_PER_PAGE = 10;
|
const TRANSACTIONS_PER_PAGE = 10;
|
||||||
|
|
||||||
function checkBalance(ethAddress, floAddress) {
|
function checkBalance(ethAddress, floAddress) {
|
||||||
if (!ethAddress) {
|
if (ethAddress) {
|
||||||
|
// If address is provided sync the input box
|
||||||
|
const searchInput = document.querySelector('#check_balance_input');
|
||||||
|
if (searchInput) {
|
||||||
|
searchInput.value = ethAddress;
|
||||||
|
const nativeInput = searchInput.querySelector('input');
|
||||||
|
if (nativeInput) {
|
||||||
|
nativeInput.value = ethAddress;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
let keyToConvert = document.querySelector('#check_balance_input').value.trim()
|
let keyToConvert = document.querySelector('#check_balance_input').value.trim()
|
||||||
|
|
||||||
// Check if input is empty
|
// Check if input is empty
|
||||||
@ -1031,7 +1041,7 @@
|
|||||||
<div class="transaction__amount">${amountPrefix}${tx.value.toFixed(8)} ${tx.symbol}</div>
|
<div class="transaction__amount">${amountPrefix}${tx.value.toFixed(8)} ${tx.symbol}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="transaction__receiver">
|
<div class="transaction__receiver">
|
||||||
${directionText} <a href="#" class="tx-participant wrap-around">${displayAddress}</a>
|
${directionText} <a href="#" class="tx-participant wrap-around" onclick=${(e) => { e.preventDefault(); checkBalance(displayAddress); }}>${displayAddress}</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex gap-0-5 flex-wrap align-center">
|
<div class="flex gap-0-5 flex-wrap align-center">
|
||||||
<button class="button button--small gap-0-3 align-center button--colored transaction__id" onclick=${() => viewTransactionDetails(tx.hash)}>
|
<button class="button button--small gap-0-3 align-center button--colored transaction__id" onclick=${() => viewTransactionDetails(tx.hash)}>
|
||||||
@ -1062,6 +1072,16 @@
|
|||||||
url.searchParams.set('tx', txHash);
|
url.searchParams.set('tx', txHash);
|
||||||
url.searchParams.delete('page');
|
url.searchParams.delete('page');
|
||||||
|
|
||||||
|
// Sync the input box with the tx hash
|
||||||
|
const searchInput = document.querySelector('#check_balance_input');
|
||||||
|
if (searchInput) {
|
||||||
|
searchInput.value = txHash;
|
||||||
|
const nativeInput = searchInput.querySelector('input');
|
||||||
|
if (nativeInput) {
|
||||||
|
nativeInput.value = txHash;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Remove address from URL unless viewing from transaction history
|
// Remove address from URL unless viewing from transaction history
|
||||||
if (!preserveAddress) {
|
if (!preserveAddress) {
|
||||||
url.searchParams.delete('address');
|
url.searchParams.delete('address');
|
||||||
@ -1117,12 +1137,16 @@
|
|||||||
|
|
||||||
<div class="grid gap-0-5">
|
<div class="grid gap-0-5">
|
||||||
<div class="label">From</div>
|
<div class="label">From</div>
|
||||||
<sm-copy value=${txDetails.from}></sm-copy>
|
<sm-copy value=${txDetails.from}>
|
||||||
|
<a href="#" class="tx-participant wrap-around" onclick=${(e) => { e.preventDefault(); checkBalance(txDetails.from); }}>${txDetails.from}</a>
|
||||||
|
</sm-copy>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="grid gap-0-5">
|
<div class="grid gap-0-5">
|
||||||
<div class="label">To</div>
|
<div class="label">To</div>
|
||||||
<sm-copy value=${txDetails.to}></sm-copy>
|
<sm-copy value=${txDetails.to}>
|
||||||
|
<a href="#" class="tx-participant wrap-around" onclick=${(e) => { e.preventDefault(); checkBalance(txDetails.to); }}>${txDetails.to}</a>
|
||||||
|
</sm-copy>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
${txDetails.tokenTransfer ? html`
|
${txDetails.tokenTransfer ? html`
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user