diff --git a/src/chains/mainnet/injective.json b/src/chains/mainnet/injective.json index 9d71fe57..1ca773ab 100644 --- a/src/chains/mainnet/injective.json +++ b/src/chains/mainnet/injective.json @@ -10,7 +10,7 @@ "assets": [{ "base": "inj", "symbol": "INJ", - "exponent": "0", + "exponent": "18", "coingecko_id": "injective-protocol", "logo": "https://dl.airtable.com/.attachments/e024faae112ae873d301f9e1e17a921c/3f3671f7/9pOKAlQ5_400x400.jpg" }] diff --git a/src/chains/mainnet/osmosis.json b/src/chains/mainnet/osmosis.json index 388ab9e2..7785c6c1 100644 --- a/src/chains/mainnet/osmosis.json +++ b/src/chains/mainnet/osmosis.json @@ -13,5 +13,11 @@ "exponent": "6", "coingecko_id": "osmosis", "logo": "https://dl.airtable.com/.attachments/4ef30ec4008bc86cc3c0f74a6bb84050/0eeb4d64/aQ5W3zaT_400x400.jpg" + },{ + "base": "uion", + "symbol": "ION", + "exponent": "6", + "coingecko_id": "ion", + "logo": "https://dl.airtable.com/.attachments/4ef30ec4008bc86cc3c0f74a6bb84050/0eeb4d64/aQ5W3zaT_400x400.jpg" }] } diff --git a/src/chains/mainnet/terra.json b/src/chains/mainnet/terra.json index c7ced89e..6a1eb192 100644 --- a/src/chains/mainnet/terra.json +++ b/src/chains/mainnet/terra.json @@ -13,5 +13,125 @@ "exponent": "6", "coingecko_id": "terra-luna", "logo": "https://dl.airtable.com/.attachments/275a6cbdbdc911856556e716a60d6ec4/87addd7f/terra.jpg" + },{ + "base": "uusd", + "symbol": "UST", + "exponent": "6", + "coingecko_id": "terrausd", + "logo": "https://raw.githubusercontent.com/osmosis-labs/assetlists/main/images/ust.png" + },{ + "base": "ukrw", + "symbol": "KRT", + "exponent": "6", + "coingecko_id": "terrakrw", + "logo": "https://raw.githubusercontent.com/osmosis-labs/assetlists/main/images/krt.png" + },{ + "base": "cw20:terra183cvzy6knvva6mpvzcq86uyfxw0nd4925m0d0m", + "symbol": "WHALE", + "exponent": "6", + "coingecko_id": "white-whale", + "logo": "https://www.whitewhale.money/tokenlogo.png" + },{ + "base": "uaud", + "symbol": "AUD", + "exponent": "6", + "coingecko_id": "", + "logo": "https://www.whitewhale.money/tokenlogo.png" + },{ + "base": "ucad", + "symbol": "CAD", + "exponent": "6", + "coingecko_id": "", + "logo": "https://www.whitewhale.money/tokenlogo.png" + },{ + "base": "uchf", + "symbol": "CHF", + "exponent": "6", + "coingecko_id": "", + "logo": "https://www.whitewhale.money/tokenlogo.png" + },{ + "base": "ucny", + "symbol": "CNY", + "exponent": "6", + "coingecko_id": "", + "logo": "https://www.whitewhale.money/tokenlogo.png" + },{ + "base": "udkk", + "symbol": "DKK", + "exponent": "6", + "coingecko_id": "", + "logo": "https://www.whitewhale.money/tokenlogo.png" + },{ + "base": "ueur", + "symbol": "EUR", + "exponent": "6", + "coingecko_id": "", + "logo": "https://www.whitewhale.money/tokenlogo.png" + },{ + "base": "ugbp", + "symbol": "GBP", + "exponent": "6", + "coingecko_id": "", + "logo": "https://www.whitewhale.money/tokenlogo.png" + },{ + "base": "uhkd", + "symbol": "HKD", + "exponent": "6", + "coingecko_id": "", + "logo": "https://www.whitewhale.money/tokenlogo.png" + },{ + "base": "uidr", + "symbol": "IDR", + "exponent": "6", + "coingecko_id": "", + "logo": "https://www.whitewhale.money/tokenlogo.png" + },{ + "base": "uinr", + "symbol": "INR", + "exponent": "6", + "coingecko_id": "", + "logo": "https://www.whitewhale.money/tokenlogo.png" + },{ + "base": "ujpy", + "symbol": "JPY", + "exponent": "6", + "coingecko_id": "", + "logo": "https://www.whitewhale.money/tokenlogo.png" + },{ + "base": "umnt", + "symbol": "MNT", + "exponent": "6", + "coingecko_id": "", + "logo": "https://www.whitewhale.money/tokenlogo.png" + },{ + "base": "uphp", + "symbol": "PHP", + "exponent": "6", + "coingecko_id": "", + "logo": "https://www.whitewhale.money/tokenlogo.png" + },{ + "base": "usdr", + "symbol": "SDR", + "exponent": "6", + "coingecko_id": "", + "logo": "https://www.whitewhale.money/tokenlogo.png" + },{ + "base": "usek", + "symbol": "SEK", + "exponent": "6", + "coingecko_id": "", + "logo": "https://www.whitewhale.money/tokenlogo.png" + },{ + "base": "usgd", + "symbol": "SGD", + "exponent": "6", + "coingecko_id": "", + "logo": "https://www.whitewhale.money/tokenlogo.png" + },{ + "base": "uthb", + "symbol": "THB", + "exponent": "6", + "coingecko_id": "", + "logo": "https://www.whitewhale.money/tokenlogo.png" }] } \ No newline at end of file diff --git a/src/libs/fetch.js b/src/libs/fetch.js index b64f4a4b..c782cc53 100644 --- a/src/libs/fetch.js +++ b/src/libs/fetch.js @@ -319,6 +319,14 @@ export default class ChainFetch { return this.get('/bank/balances/'.concat(address), config).then(data => commonProcess(data)) } + async getAllIBCDenoms(config = null) { + const sdkVersion = config ? config.sdk_version : this.config.sdk_version + if (compareVersions(sdkVersion, '0.42.4') < 0) { + return this.get('/ibc/applications/transfer/v1beta1/denom_traces?pagination.limit=500', config).then(data => commonProcess(data)) + } + return this.get('/ibc/apps/transfer/v1/denom_traces?pagination.limit=500', config).then(data => commonProcess(data)) + } + async getIBCDenomTrace(hash, config = null) { const h = hash.substring(hash.indexOf('/') + 1) const sdkVersion = config ? config.sdk_version : this.config.sdk_version diff --git a/src/libs/utils.js b/src/libs/utils.js index 40f8e823..09737589 100644 --- a/src/libs/utils.js +++ b/src/libs/utils.js @@ -288,8 +288,7 @@ export function formatTokenDenom(tokenDenom) { if (asset) denom = asset.symbol } }) - - return denom.toUpperCase() + return denom.startsWith('ibc') ? `IBC...${denom.substring(denom.length - 3)}` : denom.toUpperCase() } return '' } diff --git a/src/views/StakingRewardComponent.vue b/src/views/StakingRewardComponent.vue index fcdc08fd..8024015a 100644 --- a/src/views/StakingRewardComponent.vue +++ b/src/views/StakingRewardComponent.vue @@ -34,7 +34,7 @@