You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
425 B
14 lines
425 B
// @flow
|
|
|
|
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 fetchCurrentRates(currencies, counterValue)
|
|
send('counterValues.update', data)
|
|
} catch (err) {
|
|
console.error(err) // eslint-disable-line no-console
|
|
}
|
|
}
|
|
|