correctly encode decimal values for frontend

pull/2550/head
Ayrat Badykov 5 years ago
parent bcaeb91527
commit e15face724
No known key found for this signature in database
GPG Key ID: B44668E265E9396F
  1. 8
      apps/block_scout_web/lib/block_scout_web/chain.ex

@ -31,6 +31,14 @@ defmodule BlockScoutWeb.Chain do
alias Explorer.PagingOptions
defimpl Poison.Encoder, for: Decimal do
def encode(value, _opts) do
decimal = Decimal
[?\", decimal.to_string(value), ?\"]
end
end
@page_size 50
@default_paging_options %PagingOptions{page_size: @page_size + 1}
@address_hash_len 40

Loading…
Cancel
Save