meriadec
7 years ago
No known key found for this signature in database
GPG Key ID: 1D2FC2305E2CB399
1 changed files with
2 additions and
2 deletions
-
src/main/counterValuesSync.js
|
|
@ -1,12 +1,12 @@ |
|
|
|
// @flow
|
|
|
|
|
|
|
|
import { fetchCurrentCounterValues } from '@ledgerhq/wallet-common/lib/api/countervalue' |
|
|
|
import { fetchCurrentRates } from '@ledgerhq/wallet-common/lib/api/countervalue' |
|
|
|
|
|
|
|
type SendFunction = (type: string, data: *) => void |
|
|
|
|
|
|
|
export default async (send: SendFunction, { counterValue, currencies }: Object) => { |
|
|
|
try { |
|
|
|
const data = await fetchCurrentCounterValues(currencies, counterValue) |
|
|
|
const data = await fetchCurrentRates(currencies, counterValue) |
|
|
|
send('counterValues.update', data) |
|
|
|
} catch (err) { |
|
|
|
console.error(err) // eslint-disable-line no-console
|
|
|
|