Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get isin map #9

Merged
merged 12 commits into from Feb 22, 2021
Merged

Get isin map #9

merged 12 commits into from Feb 22, 2021

Conversation

SamiTriki
Copy link
Owner

@SamiTriki SamiTriki commented Feb 17, 2021

Get unknown isin symbols and expose them through a handy hook

  • Saves isin:security map in localstorage
  • Fetches new unknown ISIN

in PR scope

  • expose a status that can be used to know when new isins are being fetched
  • expose a callback when the isinMap get updated containing the newly added symbols
  • use the hook at the root of the app and lift up isinMap state

LaTeRRRRRR

  • Display errored figi retrieval to allow manual fix from the user
  • Load isins in chunk to avoid getting rate-limited
  • Handle openFigiApiKey - Allow bigger limits if an apiKey exists, throw app error if apiKey is stale to eithe remove apikey from .env or update it with a fresh one
  • Tests

@SamiTriki SamiTriki marked this pull request as ready for review February 17, 2021 20:50
const [status, setStatus] = useState('idle')

useEffect(() => {
async function getMissinIsinData() {
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo

}

const getMissingIsinsArray = isinMap => {
return Object.entries(isinMap).reduce((missing, current) => {
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change missing to missingIsin

return {}
}

let missingIsinsMap = missingIsinArray.reduce((all, isin, index) => {
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const

@SamiTriki SamiTriki merged commit 58b796a into master Feb 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant