mirror of
https://github.com/lnbits/lnbits.git
synced 2025-07-28 13:42:42 +02:00
feat: fix mempool endpint
This commit is contained in:
@@ -65,7 +65,7 @@
|
||||
<div>
|
||||
<a
|
||||
style="color: unset"
|
||||
:href="mempool_endpoint + '/address/' + props.row.address"
|
||||
:href="mempoolEndpoint + '/address/' + props.row.address"
|
||||
target="_blank"
|
||||
>
|
||||
{{props.row.address}}</a
|
||||
|
@@ -7,7 +7,7 @@ async function addressList(path) {
|
||||
props: [
|
||||
'addresses',
|
||||
'accounts',
|
||||
'mempool_endpoint',
|
||||
'mempool-endpoint',
|
||||
'inkey',
|
||||
'sats-denominated'
|
||||
],
|
||||
|
@@ -4,7 +4,7 @@ async function feeRate(path) {
|
||||
name: 'fee-rate',
|
||||
template,
|
||||
|
||||
props: ['rate', 'fee-value', 'sats-denominated'],
|
||||
props: ['rate', 'fee-value', 'sats-denominated', 'mempool-endpoint'],
|
||||
|
||||
computed: {
|
||||
feeRate: {
|
||||
@@ -37,7 +37,9 @@ async function feeRate(path) {
|
||||
refreshRecommendedFees: async function () {
|
||||
const {
|
||||
bitcoin: {fees: feesAPI}
|
||||
} = mempoolJS()
|
||||
} = mempoolJS({
|
||||
hostname: new URL(this.mempoolEndpoint).hostname
|
||||
})
|
||||
|
||||
const fn = async () => feesAPI.getFeesRecommended()
|
||||
this.recommededFees = await retryWithDelay(fn)
|
||||
|
@@ -82,7 +82,7 @@
|
||||
<a
|
||||
v-if="!props.row.sameTxItems"
|
||||
style="color: unset"
|
||||
:href="mempool_endpoint + '/address/' + props.row.address"
|
||||
:href="mempoolEndpoint + '/address/' + props.row.address"
|
||||
target="_blank"
|
||||
>
|
||||
{{props.row.address}}</a
|
||||
@@ -106,7 +106,7 @@
|
||||
<div class="col-10 q-pr-lg">
|
||||
<a
|
||||
style="color: unset"
|
||||
:href="mempool_endpoint + '/tx/' + props.row.txId"
|
||||
:href="mempoolEndpoint + '/tx/' + props.row.txId"
|
||||
target="_blank"
|
||||
>
|
||||
{{props.row.txId}}</a
|
||||
|
@@ -4,7 +4,7 @@ async function history(path) {
|
||||
name: 'history',
|
||||
template,
|
||||
|
||||
props: ['history', 'mempool_endpoint', 'sats-denominated'],
|
||||
props: ['history', 'mempool-endpoint', 'sats-denominated'],
|
||||
data: function () {
|
||||
return {
|
||||
historyTable: {
|
||||
|
@@ -2,6 +2,7 @@
|
||||
<q-form @submit="checkAndSend" ref="paymentFormRef" class="q-gutter-md">
|
||||
<q-card class="q-mt-lg">
|
||||
<q-card-section>
|
||||
|
||||
<send-to
|
||||
:data.sync="sendToList"
|
||||
:fee-rate="feeRate"
|
||||
@@ -17,6 +18,7 @@
|
||||
<q-card-section>
|
||||
<div class="row items-center no-wrap">
|
||||
<div class="col-4">
|
||||
{{mempoolEndpoint}}xxxxxx1
|
||||
<q-toggle
|
||||
label="Show Custom Fee"
|
||||
color="secodary"
|
||||
@@ -40,7 +42,7 @@
|
||||
<div v-show="showCustomFee" class="row items-center no-wrap q-mt-md">
|
||||
<div class="col-12">
|
||||
<q-separator class="q-mb-md"></q-separator>
|
||||
<fee-rate :fee-value="feeValue" :rate.sync="feeRate"></fee-rate>
|
||||
<fee-rate :fee-value="feeValue" :rate.sync="feeRate" :mempool-endpoint="mempoolEndpoint"></fee-rate>
|
||||
</div>
|
||||
</div>
|
||||
</q-card-section>
|
||||
@@ -78,7 +80,7 @@
|
||||
:utxos="utxos"
|
||||
:selectable="true"
|
||||
:payed-amount="totalPayedAmount"
|
||||
:mempool_endpoint="mempool_endpoint"
|
||||
:mempool-endpoint="mempoolEndpoint"
|
||||
:sats-denominated="satsDenominated"
|
||||
></utxo-list>
|
||||
</div>
|
||||
|
@@ -8,7 +8,7 @@ async function payment(path) {
|
||||
'accounts',
|
||||
'addresses',
|
||||
'utxos',
|
||||
'mempool_endpoint',
|
||||
'mempool-endpoint',
|
||||
'sats-denominated',
|
||||
'serial-signer-ref',
|
||||
'adminkey'
|
||||
@@ -291,7 +291,9 @@ async function payment(path) {
|
||||
fetchTxHex: async function (txId) {
|
||||
const {
|
||||
bitcoin: {transactions: transactionsAPI}
|
||||
} = mempoolJS() // todo: hostname
|
||||
} = mempoolJS({
|
||||
hostname: new URL(this.mempoolEndpoint).hostname
|
||||
})
|
||||
|
||||
try {
|
||||
const response = await transactionsAPI.getTxHex({txid: txId})
|
||||
|
@@ -89,7 +89,7 @@
|
||||
<div>
|
||||
<a
|
||||
style="color: unset"
|
||||
:href="mempool_endpoint + '/address/' + props.row.address"
|
||||
:href="mempoolEndpoint + '/address/' + props.row.address"
|
||||
target="_blank"
|
||||
>
|
||||
{{props.row.address}}</a
|
||||
@@ -120,7 +120,7 @@
|
||||
<div class="col-10 q-pr-lg">
|
||||
<a
|
||||
style="color: unset"
|
||||
:href="mempool_endpoint + '/tx/' + props.row.txId"
|
||||
:href="mempoolEndpoint + '/tx/' + props.row.txId"
|
||||
target="_blank"
|
||||
>
|
||||
{{props.row.txId}}</a
|
||||
|
@@ -10,7 +10,7 @@ async function utxoList(path) {
|
||||
'selectable',
|
||||
'payed-amount',
|
||||
'sats-denominated',
|
||||
'mempool_endpoint'
|
||||
'mempool-endpoint'
|
||||
],
|
||||
|
||||
data: function () {
|
||||
|
@@ -51,6 +51,15 @@
|
||||
label="Change Gap Limit"
|
||||
></q-input>
|
||||
|
||||
<q-select
|
||||
filled
|
||||
dense
|
||||
emit-value
|
||||
v-model="config.data.network"
|
||||
:options="networOptions"
|
||||
label="Network"
|
||||
></q-select>
|
||||
|
||||
<q-toggle
|
||||
:label="config.data.sats_denominated ? 'sats denominated' : 'BTC denominated'"
|
||||
color="secodary"
|
||||
|
@@ -168,6 +168,15 @@
|
||||
label="Account Extended Public Key; xpub, ypub, zpub; Bitcoin Descriptor"
|
||||
></q-input>
|
||||
|
||||
<q-select
|
||||
filled
|
||||
dense
|
||||
emit-value
|
||||
v-model="formDialog.data.network"
|
||||
:options="networOptions"
|
||||
label="Network"
|
||||
></q-select>
|
||||
|
||||
<div class="row q-mt-lg">
|
||||
<q-btn
|
||||
unelevated
|
||||
|
@@ -14,6 +14,7 @@ async function walletList(path) {
|
||||
data: {}
|
||||
},
|
||||
filter: '',
|
||||
networOptions: ['Mainnet', 'Testnet'],
|
||||
walletsTable: {
|
||||
columns: [
|
||||
{
|
||||
|
@@ -323,7 +323,9 @@ const watchOnly = async () => {
|
||||
getAddressTxsDelayed: async function (addrData) {
|
||||
const {
|
||||
bitcoin: {addresses: addressesAPI}
|
||||
} = mempoolJS()
|
||||
} = mempoolJS({
|
||||
hostname: new URL(this.config.data.mempool_endpoint).hostname
|
||||
})
|
||||
|
||||
const fn = async () =>
|
||||
addressesAPI.getAddressTxs({
|
||||
@@ -336,7 +338,9 @@ const watchOnly = async () => {
|
||||
getAddressTxsUtxoDelayed: async function (address) {
|
||||
const {
|
||||
bitcoin: {addresses: addressesAPI}
|
||||
} = mempoolJS()
|
||||
} = mempoolJS({
|
||||
hostname: new URL(this.config.data.mempool_endpoint).hostname
|
||||
})
|
||||
|
||||
const fn = async () =>
|
||||
addressesAPI.getAddressTxsUtxo({
|
||||
|
@@ -89,7 +89,7 @@
|
||||
ref="addressList"
|
||||
:addresses="addresses"
|
||||
:accounts="walletAccounts"
|
||||
:mempool_endpoint="config.data.mempool_endpoint"
|
||||
:mempool-endpoint="config.data.mempool_endpoint"
|
||||
:sats-denominated="config.data.sats_denominated"
|
||||
@scan:address="scanAddress"
|
||||
@show-address-details="showAddressDetails"
|
||||
@@ -101,14 +101,14 @@
|
||||
<q-tab-panel name="history">
|
||||
<history
|
||||
:history="history"
|
||||
:mempool_endpoint="config.data.mempool_endpoint"
|
||||
:mempool-endpoint="config.data.mempool_endpoint"
|
||||
:sats-denominated="config.data.sats_denominated"
|
||||
></history>
|
||||
</q-tab-panel>
|
||||
<q-tab-panel name="utxos">
|
||||
<utxo-list
|
||||
:utxos="utxos.data"
|
||||
:mempool_endpoint="config.data.mempool_endpoint"
|
||||
:mempool-endpoint="config.data.mempool_endpoint"
|
||||
:sats-denominated="config.data.sats_denominated"
|
||||
></utxo-list>
|
||||
</q-tab-panel>
|
||||
@@ -116,12 +116,14 @@
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
<div class="q-pt-sm">
|
||||
{{config.data.mempool_endpoint}}
|
||||
<payment
|
||||
ref="paymentRef"
|
||||
v-show="showPayment"
|
||||
:accounts="walletAccounts"
|
||||
:addresses="addresses"
|
||||
:utxos="utxos.data"
|
||||
:mempool-endpoint="config.data.mempool_endpoint"
|
||||
:adminkey="g.user.wallets[0].adminkey"
|
||||
:serial-signer-ref="$refs.serialSigner"
|
||||
></payment>
|
||||
|
Reference in New Issue
Block a user