Recreation of Jacob's PR #104 - I was unable to modify the existing PR due to permissions.
Added a couple of modifications to make it easier to work with this:
[x] Refactored getExchangeRate to use monetary-js helper classes, ExchangeRate and MonetaryAmounts, to make conversions a bit easier
[x] Some minor refactoring, particularly where bigint were converted to number for some calculations. Decided to rather use Big in most places to avoid potential issues caused by down casting of very large bigints.
[x] Expanded the schema a bit from where it was in Jacob's work. Added symbol fields which are somewhat easier to quickly query than our complex currency types.
Resolves #103 , resolves #107
Recreation of Jacob's PR #104 - I was unable to modify the existing PR due to permissions.
Added a couple of modifications to make it easier to work with this:
getExchangeRate
to usemonetary-js
helper classes,ExchangeRate
andMonetaryAmounts
, to make conversions a bit easierbigint
were converted tonumber
for some calculations. Decided to rather useBig
in most places to avoid potential issues caused by down casting of very large bigints.symbol
fields which are somewhat easier to quickly query than our complex currency types.