()
| 1 | import axios from 'axios'; |
| 2 | |
| 3 | export const getCurrency = async () => { |
| 4 | const resp = await axios.get( |
| 5 | 'https://olinda.bcb.gov.br/olinda/servico/PTAX/versao/v1/odata/Moedas?$top=100&$format=json' |
| 6 | ); |
| 7 | |
| 8 | return new Map( |
| 9 | resp.data.value.map((currency) => [ |
| 10 | currency.simbolo, |
| 11 | { |
| 12 | simbolo: currency.simbolo, |
| 13 | nome: currency.nomeFormatado, |
| 14 | tipo_moeda: currency.tipoMoeda, |
| 15 | }, |
| 16 | ]) |
| 17 | ); |
| 18 | }; |
no outgoing calls
no test coverage detected