Skip to content

Commit

Permalink
Merge pull request blockscout#5863 from blockscout/vb-update-poison
Browse files Browse the repository at this point in the history
  • Loading branch information
vbaranov authored and jagdeep sidhu committed Aug 11, 2022
1 parent a7f1faa commit 8690515
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 10 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
- [#5807](https://github.com/blockscout/blockscout/pull/5807) - Update Makefile migrate command due to release build

### Chore
- [#5863](https://github.com/blockscout/blockscout/pull/5863) - Update Poison hex package
- [#5861](https://github.com/blockscout/blockscout/pull/5861) - Add cache for docker build
- [#5859](https://github.com/blockscout/blockscout/pull/5859) - Update ex_cldr hex packages
- [#5858](https://github.com/blockscout/blockscout/pull/5858) - Update CHANGELOG; revert update of css-loader; rename fontawesome icons selectors
Expand Down
4 changes: 2 additions & 2 deletions apps/block_scout_web/lib/block_scout_web/chain.ex
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ defmodule BlockScoutWeb.Chain do

alias Explorer.PagingOptions

defimpl Poison.Encoder, for: Decimal do
defimpl Poison.Encoder, for: Poison.Encoder.Decimal do
def encode(value, _opts) do
# silence the xref warning
decimal = Decimal
decimal = Poison.Encoder.Decimal

[?\", decimal.to_string(value), ?\"]
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
<%= render BlockScoutWeb.IconsView, "_check_dark_forest_icon.html" %>
</i>
<% true -> %>
<i class="fa-regular fa-circle-check"></i>
<i class="fa-regular fa-check-circle"></i>
<% end %>
<% end %>
<% end %>
Expand All @@ -73,7 +73,7 @@
to: AccessHelpers.get_path(@conn, :address_decompiled_contract_path, :index, @address.hash),
class: "card-tab #{tab_status("decompiled-contracts", @conn.request_path)}") do %>
<%= gettext("Decompiled code") %>
<i class="fa-regular fa-circle-check"></i>
<i class="fa-regular fa-check-circle"></i>
<% end %>
<% end %>
<%= if smart_contract_with_read_only_functions?(@address) do %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ defmodule BlockScoutWeb.AddressContractView do
render_scripts(conn, "address_contract/code_highlighting.js")
end

def format_smart_contract_abi(abi), do: Poison.encode!(abi, pretty: false)
def format_smart_contract_abi(abi) when not is_nil(abi), do: Poison.encode!(abi, %{pretty: false})

@doc """
Returns the correct format for the optimization text.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ defmodule BlockScoutWeb.Tokens.Instance.MetadataView do

def format_metadata(nil), do: ""

def format_metadata(metadata), do: Poison.encode!(metadata, pretty: true)
def format_metadata(metadata), do: Poison.encode!(metadata, %{pretty: true})
end
2 changes: 1 addition & 1 deletion apps/block_scout_web/mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ defmodule BlockScoutWeb.Mixfile do
{:plug_cowboy, "~> 2.2"},
# Waiting for the Pretty Print to be implemented at the Jason lib
# https://github.com/michalmuskala/jason/issues/15
{:poison, "~> 4.0"},
{:poison, "~> 5.0.0"},
{:postgrex, ">= 0.0.0"},
# For compatibility with `prometheus_process_collector`, which hasn't been updated yet
{:prometheus, "~> 4.0", override: true},
Expand Down
2 changes: 1 addition & 1 deletion apps/block_scout_web/test/block_scout_web/chain_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ defmodule BlockScoutWeb.ChainTest do
test "correctly encodes decimal values" do
val = Decimal.from_float(5.55)

assert "\"5.55\"" == Poison.encode!(val)
assert "5.55" == Poison.encode!(val)
end
end
end
2 changes: 1 addition & 1 deletion apps/explorer/mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ defmodule Explorer.Mixfile do
{:mock, "~> 0.3.0", only: [:test], runtime: false},
{:mox, "~> 1.0", only: [:test]},
{:phoenix_html, "== 3.0.4"},
{:poison, "~> 4.0.1"},
{:poison, "~> 5.0.0"},
{:nimble_csv, "~> 1.1"},
{:postgrex, ">= 0.0.0"},
# For compatibility with `prometheus_process_collector`, which hasn't been updated yet
Expand Down
2 changes: 1 addition & 1 deletion mix.lock
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
"plug": {:hex, :plug, "1.13.6", "187beb6b67c6cec50503e940f0434ea4692b19384d47e5fdfd701e93cadb4cc2", [:mix], [{:mime, "~> 1.0 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:plug_crypto, "~> 1.1.1 or ~> 1.2", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4.3 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "02b9c6b9955bce92c829f31d6284bf53c591ca63c4fb9ff81dfd0418667a34ff"},
"plug_cowboy": {:hex, :plug_cowboy, "2.5.2", "62894ccd601cf9597e2c23911ff12798a8a18d237e9739f58a6b04e4988899fe", [:mix], [{:cowboy, "~> 2.7", [hex: :cowboy, repo: "hexpm", optional: false]}, {:cowboy_telemetry, "~> 0.3", [hex: :cowboy_telemetry, repo: "hexpm", optional: false]}, {:plug, "~> 1.7", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "ea6e87f774c8608d60c8d34022a7d073bd7680a0a013f049fc62bf35efea1044"},
"plug_crypto": {:hex, :plug_crypto, "1.2.2", "05654514ac717ff3a1843204b424477d9e60c143406aa94daf2274fdd280794d", [:mix], [], "hexpm", "87631c7ad914a5a445f0a3809f99b079113ae4ed4b867348dd9eec288cecb6db"},
"poison": {:hex, :poison, "4.0.1", "bcb755a16fac91cad79bfe9fc3585bb07b9331e50cfe3420a24bcc2d735709ae", [:mix], [], "hexpm", "ba8836feea4b394bb718a161fc59a288fe0109b5006d6bdf97b6badfcf6f0f25"},
"poison": {:hex, :poison, "5.0.0", "d2b54589ab4157bbb82ec2050757779bfed724463a544b6e20d79855a9e43b24", [:mix], [{:decimal, "~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "11dc6117c501b80c62a7594f941d043982a1bd05a1184280c0d9166eb4d8d3fc"},
"poolboy": {:hex, :poolboy, "1.5.2", "392b007a1693a64540cead79830443abf5762f5d30cf50bc95cb2c1aaafa006b", [:rebar3], [], "hexpm", "dad79704ce5440f3d5a3681c8590b9dc25d1a561e8f5a9c995281012860901e3"},
"postgrex": {:hex, :postgrex, "0.15.13", "7794e697481799aee8982688c261901de493eb64451feee6ea58207d7266d54a", [:mix], [{:connection, "~> 1.0", [hex: :connection, repo: "hexpm", optional: false]}, {:db_connection, "~> 2.1", [hex: :db_connection, repo: "hexpm", optional: false]}, {:decimal, "~> 1.5 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}], "hexpm", "3ffb76e1a97cfefe5c6a95632a27ffb67f28871c9741fb585f9d1c3cd2af70f1"},
"prometheus": {:hex, :prometheus, "4.8.1", "fa76b152555273739c14b06f09f485cf6d5d301fe4e9d31b7ff803d26025d7a0", [:mix, :rebar3], [{:quantile_estimator, "~> 0.2.1", [hex: :quantile_estimator, repo: "hexpm", optional: false]}], "hexpm", "6edfbe928d271c7f657a6f2c46258738086584bd6cae4a000b8b9a6009ba23a5"},
Expand Down

0 comments on commit 8690515

Please sign in to comment.