availproject / bridge-ui-indexer

Avail bridge UI Indexer service
4 stars 3 forks source link

feat: Adds Tests + Decouples parseAmount fn + fix BigNumber inital parse #20

Closed moraesjeremias closed 3 months ago

moraesjeremias commented 3 months ago

Description

Related Issue

https://github.com/availproject/helm-values/issues

Motivation and Context

parseAmount fn can't handle scientific notated numbers, therefore it throws an error and returns an empty string. Must guarantee that all BigNumbers previously parsed will be strings not on scientific notation. As per BigNumber.js docs it's recommended toFixed instead of toString to avoid scientific notation.

How Has This Been Tested?

Github Actions Run #Test 2

Screenshots (if appropriate)