removed fee increase option for multisig txs
This commit is contained in:
parent
09d4d82ea5
commit
ef9dbd70cb
@ -170,14 +170,17 @@ a:any-link:focus-visible {
|
||||
|
||||
details summary {
|
||||
display: flex;
|
||||
gap: 0.3rem;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
user-select: none;
|
||||
cursor: pointer;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
color: var(--accent-color);
|
||||
}
|
||||
details summary .down-arrow {
|
||||
fill: var(--accent-color);
|
||||
}
|
||||
|
||||
details[open] summary {
|
||||
margin-bottom: 1rem;
|
||||
|
||||
2
css/main.min.css
vendored
2
css/main.min.css
vendored
File diff suppressed because one or more lines are too long
@ -150,11 +150,14 @@ a:any-link:focus-visible {
|
||||
|
||||
details summary {
|
||||
display: flex;
|
||||
gap: 0.3rem;
|
||||
user-select: none;
|
||||
cursor: pointer;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
color: var(--accent-color);
|
||||
.down-arrow {
|
||||
fill: var(--accent-color);
|
||||
}
|
||||
}
|
||||
|
||||
details[open] {
|
||||
|
||||
11
index.html
11
index.html
@ -1270,6 +1270,7 @@
|
||||
let txDetailsAbortController
|
||||
const render = {
|
||||
transactionCard(transactionDetails) {
|
||||
console.log(transactionDetails)
|
||||
let { address, amount, time, txid, sender, receiver, type, block } = transactionDetails;
|
||||
let transactionReceiver
|
||||
let icon
|
||||
@ -1290,6 +1291,9 @@
|
||||
if (!block) {
|
||||
icon = svg`<svg class="icon" xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><g><rect fill="none" height="24" width="24"/></g><g><path d="M6,2l0.01,6L10,12l-3.99,4.01L6,22h12v-6l-4-4l4-3.99V2H6z M16,16.5V20H8v-3.5l4-4L16,16.5z"/></g></svg>`;
|
||||
}
|
||||
const queriedAddress = pagesData.params?.query || getRef('search_query_input').value.trim()
|
||||
const isSender = type === 'out' || type === 'self'
|
||||
const isMultisig = btcOperator.validateAddress(queriedAddress) !== 'standard'
|
||||
const className = `transaction grid ${type} ${block === null ? 'unconfirmed-tx' : ''}`
|
||||
return html.node`
|
||||
<li class="${className}" data-txid="${txid}" data-transacting-addresses=${transactingAddresses.slice(2)}>
|
||||
@ -1308,7 +1312,7 @@
|
||||
<svg class="icon" xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"/></svg>
|
||||
View details
|
||||
</a>
|
||||
${!block ? html`
|
||||
${isSender && !block && !isMultisig ? html`
|
||||
<div class="multi-state-button">
|
||||
<button class="button button--small gap-0-3" onclick=${initFeeChange} title="Resend transaction with greater fees to reduce confirmation time">
|
||||
<svg class="icon" xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z"/></svg>
|
||||
@ -1318,7 +1322,10 @@
|
||||
` : ''}
|
||||
</div>
|
||||
${!block ? html`
|
||||
<p class="pending-badge">Confirmation pending: amount will be deducted after transaction is confirmed. Try increasing fee to speed up confirmation.</p>
|
||||
<p class="pending-badge">
|
||||
Confirmation pending: amount will be deducted after transaction is confirmed.
|
||||
${isSender && !block && !isMultisig ? ' Try increasing fee to speed up confirmation' : ''}
|
||||
</p>
|
||||
` : ''}
|
||||
</div>
|
||||
</li>
|
||||
|
||||
@ -94,7 +94,7 @@
|
||||
value: key => coinjs.bech32Address(btcOperator.pubkey(key)).address
|
||||
},
|
||||
bech32mAddress: {
|
||||
value: key => segwit_addr.encode("bc",1,key)
|
||||
value: key => segwit_addr.encode("bc", 1, key)
|
||||
}
|
||||
});
|
||||
|
||||
@ -121,7 +121,7 @@
|
||||
if (!addr)
|
||||
return undefined;
|
||||
let type = coinjs.addressDecode(addr).type;
|
||||
if (["standard", "multisig", "bech32", "multisigBech32","bech32m"].includes(type))
|
||||
if (["standard", "multisig", "bech32", "multisigBech32", "bech32m"].includes(type))
|
||||
return type;
|
||||
else
|
||||
return false;
|
||||
@ -286,7 +286,7 @@
|
||||
BECH32_OUTPUT_SIZE = 23,
|
||||
BECH32_MULTISIG_OUTPUT_SIZE = 34,
|
||||
SEGWIT_OUTPUT_SIZE = 23;
|
||||
BECH32M_OUTPUT_SIZE = 35; // Check this later
|
||||
BECH32M_OUTPUT_SIZE = 35; // Check this later
|
||||
|
||||
function _redeemScript(addr, key) {
|
||||
let decode = coinjs.addressDecode(addr);
|
||||
@ -337,7 +337,7 @@
|
||||
case "multisig":
|
||||
return BASE_OUTPUT_SIZE + SEGWIT_OUTPUT_SIZE;
|
||||
case "bech32m":
|
||||
return BASE_OUTPUT_SIZE + BECH32M_OUTPUT_SIZE;
|
||||
return BASE_OUTPUT_SIZE + BECH32M_OUTPUT_SIZE;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
@ -657,7 +657,7 @@
|
||||
btcOperator.sendTx = function (senders, privkeys, receivers, amounts, fee = null, options = {}) {
|
||||
return new Promise((resolve, reject) => {
|
||||
createSignedTx(senders, privkeys, receivers, amounts, fee, options).then(result => {
|
||||
// debugger;
|
||||
// debugger;
|
||||
broadcastTx(result.transaction.serialize())
|
||||
.then(txid => resolve(txid))
|
||||
.catch(error => reject(error));
|
||||
|
||||
Loading…
Reference in New Issue
Block a user