Skip to content

Comments

Feature/bignumber integration#4

Open
serhiiZv wants to merge 15 commits intodevelopfrom
feature/bignumber-integration
Open

Feature/bignumber integration#4
serhiiZv wants to merge 15 commits intodevelopfrom
feature/bignumber-integration

Conversation

@serhiiZv
Copy link
Collaborator

No description provided.

- Added utils/bignumber.ts
- Implemented formatAmountBN and formatTokenAmountBN
- Updated AssetsScreen to use BigNumber
- Added getFiatValueBN method to PricingService
…port

- Disabled `import/no-named-as-default` to avoid false positives with BigNumber
- Added `"baseUrl": "."` to tsconfig for proper alias resolution
- Updated import style to `import BigNumber from 'bignumber.js'` for better readability
@serhiiZv serhiiZv marked this pull request as ready for review December 18, 2025 12:03
/** Add two BN values */
export const add = (a: BNValue, b: BNValue): BigNumber => bn(a).plus(b);

/** Subtract b from a */
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please remove such an obvious comments. The code is self explanatory

Comment on lines +14 to +18
/**
* Factory function to create a BN instance safely
* - Accepts string, number, or BN instance
* - Avoids precision loss from floating point numbers
*/
Copy link
Collaborator

Choose a reason for hiding this comment

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

The function is self-explaining. Please remove such comments

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.

4 participants