Loëck Vézien
7 years ago
No known key found for this signature in database
GPG Key ID: CBCDCE384E853AC4
4 changed files with
6 additions and
7 deletions
-
src/actions/counterValues.js
-
src/components/base/Chart/Tooltip.js
-
src/components/modals/AddAccount/index.js
-
src/reducers/counterValues.js
|
|
@ -2,8 +2,8 @@ |
|
|
|
|
|
|
|
import { getFiatUnit } from '@ledgerhq/currencies' |
|
|
|
import { fetchHistodayCounterValuesMultiple } from '@ledgerhq/wallet-common/lib/api/countervalue' |
|
|
|
import type { Currency } from '@ledgerhq/currencies' |
|
|
|
|
|
|
|
import type { Currency } from '@ledgerhq/currencies' |
|
|
|
import type { Dispatch } from 'redux' |
|
|
|
|
|
|
|
import db from 'helpers/db' |
|
|
@ -29,6 +29,7 @@ export const fetchCounterValues: FetchCounterValues = (currencies: ?(Currency[]) |
|
|
|
if (!currencies) { |
|
|
|
currencies = accounts.map(a => a.currency) |
|
|
|
} |
|
|
|
|
|
|
|
const { counterValue } = settings |
|
|
|
const fiatUnit = getFiatUnit(counterValue) |
|
|
|
const counterValues = await fetchHistodayCounterValuesMultiple(currencies, fiatUnit) |
|
|
|
|
|
@ -51,7 +51,7 @@ const Tooltip = ({ |
|
|
|
left: 0, |
|
|
|
transform: `translate3d(-50%, 0, 0)`, |
|
|
|
whiteSpace: 'nowrap', |
|
|
|
marginBottom: 10, |
|
|
|
marginBottom: 5, |
|
|
|
}} |
|
|
|
> |
|
|
|
<TooltipContainer style={{ textAlign: 'center' }}> |
|
|
@ -68,9 +68,7 @@ const Tooltip = ({ |
|
|
|
/> |
|
|
|
)} |
|
|
|
</TooltipContainer> |
|
|
|
<div style={{ background: 'red' }}> |
|
|
|
<Arrow /> |
|
|
|
</div> |
|
|
|
<Arrow /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
) |
|
|
|
|
|
@ -131,7 +131,7 @@ class AddAccountModal extends PureComponent<Props, State> { |
|
|
|
stepIndex: 0, |
|
|
|
}) |
|
|
|
|
|
|
|
await fetchCounterValues(currency.coinType) |
|
|
|
await fetchCounterValues([currency]) |
|
|
|
|
|
|
|
this.setState({ |
|
|
|
fetchingCounterValues: false, |
|
|
|
|
|
@ -8,8 +8,8 @@ import { |
|
|
|
makeReverseCounterValue, |
|
|
|
formatCounterValueDay, |
|
|
|
} from '@ledgerhq/wallet-common/lib/helpers/countervalue' |
|
|
|
import type { CalculateCounterValue } from '@ledgerhq/wallet-common/lib/types' |
|
|
|
|
|
|
|
import type { CalculateCounterValue } from '@ledgerhq/wallet-common/lib/types' |
|
|
|
import type { State } from 'reducers' |
|
|
|
|
|
|
|
export type CounterValuesState = {} |
|
|
|