Replace symbol for some tokens to be able to find price in CoinGecko for OmniBridge supply

pull/3312/head
Victor Baranov 4 years ago
parent 2bb047f30d
commit ef7815a936
  1. 1
      CHANGELOG.md
  2. 9
      apps/explorer/lib/explorer/chain/supply/token_bridge.ex

@ -11,6 +11,7 @@
- [#3261](https://github.com/poanetwork/blockscout/pull/3261) - Bridged tokens table
### Fixes
- [#3312](https://github.com/poanetwork/blockscout/pull/3312) - Replace symbol for some tokens to be able to find price in CoinGecko for OmniBridge balance
- [#3307](https://github.com/poanetwork/blockscout/pull/3307) - Replace "latest" compiler version with the actual one
- [#3303](https://github.com/poanetwork/blockscout/pull/3303) - Address contract twins feature performance
- [#3295](https://github.com/poanetwork/blockscout/pull/3295) - Token instance: check if external_url is not null before trimming

@ -214,7 +214,14 @@ defmodule Explorer.Chain.Supply.TokenBridge do
bridged_mainnet_tokens_with_supply =
bridged_mainnet_tokens_list
|> Enum.map(fn {bridged_token_hash, bridged_token_symbol} ->
bridged_token_price = Bridge.fetch_token_price(bridged_token_symbol)
bridged_token_symbol_corrected =
case bridged_token_symbol do
"POA20" -> "POA"
"yDAI+yUSDC+yUSDT+yTUSD" -> "yCurve"
symbol -> symbol
end
bridged_token_price = Bridge.fetch_token_price(bridged_token_symbol_corrected)
query =
from(t in Token,

Loading…
Cancel
Save