Commit acd6b33
authored
fix: change Transaction.value type from number to string to prevent overflow (#1836)
JavaScript's Number type can only safely represent integers up to 2^53-1.
When the API returns large wei values (like NFT prices in wei), they can
overflow and become negative values like -1617240366657743600.
This fix changes Transaction.value type from number to string, which:
- Prevents integer overflow for large wei values
- Works with ethers.js which accepts strings as BigNumberish
- Matches how the API should serialize large integer values1 parent 125b065 commit acd6b33
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
| 82 | + | |
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| |||
0 commit comments