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

fix(bridge-ui): handle scientific notation #14105

Merged
merged 4 commits into from
Jul 5, 2023
Merged

Conversation

jscriptcoder
Copy link
Contributor

@jscriptcoder jscriptcoder commented Jul 5, 2023

Problem: Relayer might return e-notation ints such as 2e+21. BigNumber cannot handle this format

Solution: using built-in BigInt to help us handle it

Note: Bridge-UI v2 is no longer using BigNumber library. will be using built-in bigint instead 😉

@codecov
Copy link

codecov bot commented Jul 5, 2023

Codecov Report

Merging #14105 (0ab69ca) into main (eda0333) will increase coverage by 0.04%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main   #14105      +/-   ##
==========================================
+ Coverage   51.57%   51.62%   +0.04%     
==========================================
  Files         148      149       +1     
  Lines        3874     3878       +4     
  Branches      336      336              
==========================================
+ Hits         1998     2002       +4     
  Misses       1765     1765              
  Partials      111      111              
Flag Coverage Δ *Carryforward flag
bridge-ui 94.26% <100.00%> (+0.02%) ⬆️
eventindexer 73.82% <ø> (ø) Carriedforward from 30e5a80
protocol 0.00% <ø> (ø) Carriedforward from 30e5a80
relayer 59.13% <ø> (ø) Carriedforward from 30e5a80
ui 100.00% <ø> (ø) Carriedforward from 30e5a80

*This pull request uses carry forward flags. Click here to find out more.

Impacted Files Coverage Δ
...ges/bridge-ui/src/relayer-api/RelayerAPIService.ts 100.00% <100.00%> (ø)
packages/bridge-ui/src/utils/toBigNumber.ts 100.00% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

davidtaikocha
davidtaikocha previously approved these changes Jul 5, 2023
@jscriptcoder jscriptcoder added this pull request to the merge queue Jul 5, 2023
Merged via the queue into main with commit fcc154e Jul 5, 2023
3 checks passed
@jscriptcoder jscriptcoder deleted the handle_e_notation branch July 5, 2023 12:00
@github-actions github-actions bot mentioned this pull request Jul 5, 2023
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.

3 participants