From b82c7932acda6a3f4effe8ba82ae83a9264b6750 Mon Sep 17 00:00:00 2001 From: ryuash Date: Thu, 24 Feb 2022 10:36:24 +0800 Subject: [PATCH] hotfix: my trust issues with actions --- CHANGELOG.md | 3 +++ next-env.d.ts | 1 - src/utils/get_denom.ts | 6 +++++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d4c2fe2c11..af65a54939 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,9 @@ - Display accounts even if balance is 0 and does not exist ([\#692](https://github.com/forbole/big-dipper-2.0-cosmos/issues/692)) - Update handling of 18 decimal places denoms ([\#724](https://github.com/forbole/big-dipper-2.0-cosmos/issues/724)) +## Bug fixes +- Add better handling of get denom return types ([\#735](https://github.com/forbole/big-dipper-2.0-cosmos/issues/735)) + # base-v2.0.0-rc1 - 2021-02-07 ## Changes diff --git a/next-env.d.ts b/next-env.d.ts index 9bc3dd46b9..4f11a03dc6 100644 --- a/next-env.d.ts +++ b/next-env.d.ts @@ -1,5 +1,4 @@ /// -/// /// // NOTE: This file should not be edited diff --git a/src/utils/get_denom.ts b/src/utils/get_denom.ts index 36db5d816b..751a0651f4 100644 --- a/src/utils/get_denom.ts +++ b/src/utils/get_denom.ts @@ -1,3 +1,4 @@ +import * as R from 'ramda'; import { chainConfig } from '@configs'; /** @@ -21,7 +22,10 @@ export const getDenom = ( amount: '0', }; if (selectedDenom) { - results = selectedDenom; + results = { + denom: R.pathOr('', ['denom'], selectedDenom), + amount: R.pathOr('0', ['amount'], selectedDenom), + }; } return results; };