webwall-show txn status
This commit is contained in:
@@ -92,6 +92,8 @@ Check if an address belongs to any loaded wallet.
|
||||
./find_address.sh rin1qvj0yyt9phvled9kxflju3p687a4s7kareglpk5
|
||||
```
|
||||
|
||||
|
||||
|
||||
### dump_wallet.sh
|
||||
Create a secure backup of all private keys in a wallet.
|
||||
|
||||
@@ -144,3 +146,10 @@ You can override these defaults by providing them as the last arguments to any s
|
||||
- Consider using HTTPS or local connections only
|
||||
- Update default RPC credentials for production use
|
||||
- Store scripts securely and avoid hardcoding sensitive information
|
||||
|
||||
|
||||
|
||||
<!-- get txnL -->
|
||||
curl -X POST -H "Content-Type: application/json" \
|
||||
-d '{"jsonrpc": "1.0", "id":"gettx", "method": "gettransaction", "params": ["bcf19926894272e5f6d9a6cceedeac4bff0a2b23c496f660d168ded8fd49a462"]}' \
|
||||
http://rinrpc:745ce784d5d537fc06105a1b935b7657903cfc71a5fb3b90@127.0.0.1:9556/wallet/main
|
||||
@@ -10,6 +10,7 @@ if [ $# -lt 1 ]; then
|
||||
echo " $0 getnewaddress myaccount"
|
||||
echo " $0 listtransactions \"*\" 10"
|
||||
echo " $0 gettransaction txid"
|
||||
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
@@ -127,6 +127,26 @@
|
||||
.sidebar button {
|
||||
width: 100%;
|
||||
}
|
||||
.status-badge {
|
||||
font-size: 11px;
|
||||
padding: 2px 6px;
|
||||
border-radius: 3px;
|
||||
font-weight: 500;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.05em;
|
||||
}
|
||||
.status-pending {
|
||||
background: rgba(255, 193, 7, 0.2);
|
||||
color: #ffc107;
|
||||
}
|
||||
.status-confirmed {
|
||||
background: rgba(76, 175, 80, 0.2);
|
||||
color: #4caf50;
|
||||
}
|
||||
.status-immature {
|
||||
background: rgba(255, 152, 0, 0.2);
|
||||
color: #ff9800;
|
||||
}
|
||||
@media (max-width: 900px) {
|
||||
body {
|
||||
flex-direction: column;
|
||||
@@ -246,8 +266,22 @@
|
||||
const li = document.createElement('li');
|
||||
const amount = Number(tx.amount).toFixed(8);
|
||||
const type = tx.category === 'send' ? 'Sent' : 'Received';
|
||||
const confirmations = tx.confirmations || 0;
|
||||
|
||||
let status, statusClass;
|
||||
if (confirmations === 0) {
|
||||
status = 'Pending';
|
||||
statusClass = 'status-pending';
|
||||
} else if (confirmations < 20) {
|
||||
status = `Immature (${confirmations}/20)`;
|
||||
statusClass = 'status-immature';
|
||||
} else {
|
||||
status = 'Confirmed';
|
||||
statusClass = 'status-confirmed';
|
||||
}
|
||||
|
||||
li.innerHTML = `
|
||||
<div><strong>${type}</strong> ${amount} RIN</div>
|
||||
<div><strong>${type}</strong> ${amount} RIN <span class="status-badge ${statusClass}">${status}</span></div>
|
||||
<div class="muted">${tx.time ? new Date(tx.time * 1000).toLocaleString() : ''}</div>
|
||||
<div class="muted">${tx.txid}</div>
|
||||
`;
|
||||
|
||||
Reference in New Issue
Block a user