From d7fdaabd5e06d308cc335bd3ee4db5b1685a1593 Mon Sep 17 00:00:00 2001 From: Mononaut Date: Wed, 18 May 2022 15:11:23 +0000 Subject: [PATCH] v2.3.1 bug fixes --- .../src/components/TransactionOverlay.svelte | 22 ++++++++++++------- server/lib/bridge_block.ex | 1 - server/lib/bridge_sequence.ex | 4 ++-- server/lib/protocol/transaction.ex | 2 +- server/lib/spend_index.ex | 4 ++-- 5 files changed, 19 insertions(+), 14 deletions(-) diff --git a/client/src/components/TransactionOverlay.svelte b/client/src/components/TransactionOverlay.svelte index 27972d2..86106bb 100644 --- a/client/src/components/TransactionOverlay.svelte +++ b/client/src/components/TransactionOverlay.svelte @@ -484,7 +484,7 @@ async function goToBlock(e) { justify-content: center; align-items: center; - .chevron { + .raw-svg { .outline { stroke: white; stroke-width: 32; @@ -501,13 +501,13 @@ async function goToBlock(e) { } &:hover { - .chevron .outline { + .raw-svg .outline { fill-opacity: 1; } } &.loading { - .chevron .outline { + .raw-svg .outline { stroke-opacity: 0; animation-name: svgpulse; animation-delay: 500ms; @@ -519,7 +519,7 @@ async function goToBlock(e) { &.disabled { cursor: normal; opacity: 0.5; - .chevron .outline { + .raw-svg .outline { stroke-opacity: 1; fill-opacity: 1; } @@ -710,7 +710,7 @@ async function goToBlock(e) {
clickItem(input)}> {#if input.prev_txid } goToInput(e, input)} class="put-link" transition:fade|local={{ duration: 200 }}> - + @@ -753,19 +753,25 @@ async function goToBlock(e) {
clickItem(output)}> {#if loadingSpends} - + + {:else if output.opreturn } + + + + + {:else if spends[output.index] == true} - + {:else if spends[output.index]} goToSpend(e, spends[output.index])} title="spent" class="put-link" in:fade|local={{ duration: 200 }}> - + diff --git a/server/lib/bridge_block.ex b/server/lib/bridge_block.ex index 937e2df..7425214 100644 --- a/server/lib/bridge_block.ex +++ b/server/lib/bridge_block.ex @@ -13,7 +13,6 @@ defmodule BitcoinStream.Bridge.Block do alias BitcoinStream.Mempool, as: Mempool alias BitcoinStream.RPC, as: RPC alias BitcoinStream.BlockData, as: BlockData - alias BitcoinStream.Index.Spend, as: SpendIndex def child_spec(host: host, port: port) do %{ diff --git a/server/lib/bridge_sequence.ex b/server/lib/bridge_sequence.ex index 062d33c..8e32f89 100644 --- a/server/lib/bridge_sequence.ex +++ b/server/lib/bridge_sequence.ex @@ -109,7 +109,7 @@ defmodule BitcoinStream.Bridge.Sequence do # Transaction removed from mempool for non block inclusion reason 'R' -> - <> = rest; + <<_seq::little-size(64)>> = rest; case Mempool.drop(:mempool, hash) do count when is_integer(count) -> send_drop_tx(hash, count); @@ -127,7 +127,7 @@ defmodule BitcoinStream.Bridge.Sequence do true # Don't care about other events - other -> + _other -> true end else diff --git a/server/lib/protocol/transaction.ex b/server/lib/protocol/transaction.ex index 74bf5ed..a21d33c 100644 --- a/server/lib/protocol/transaction.ex +++ b/server/lib/protocol/transaction.ex @@ -182,7 +182,7 @@ defmodule BitcoinStream.Protocol.Transaction do # Retrieves cached inputs if available, # otherwise inflates inputs in batches of up to 100 - def inflate_inputs(txid, inputs, fail_fast) do + def inflate_inputs(_txid, inputs, fail_fast) do inflate_inputs(Enum.chunk_every(inputs, 100), [], 0, fail_fast) end diff --git a/server/lib/spend_index.ex b/server/lib/spend_index.ex index 1d540dc..100ae1b 100644 --- a/server/lib/spend_index.ex +++ b/server/lib/spend_index.ex @@ -305,10 +305,10 @@ defmodule BitcoinStream.Index.Spend do %{"error" => nil, "id" => index, "result" => nil} -> { index, true } - %{"error" => nil, "id" => index, "result" => result} -> + %{"error" => nil, "id" => index, "result" => _result} -> { index, false } - %{"error" => error, "id" => index } -> + %{"error" => _error, "id" => index } -> { index, false } end end),