Web3.js: Returning of BigNumber objects instead of strings

Created on 25 Mar 2019  路  3Comments  路  Source: ChainSafe/web3.js

Description

It's returning strings instead of BigNumber objects on a contract method call.

Expected behavior

Returns a BigNumber object instead of a string.

Actual behavior

Returns a number as string.

Steps to reproduce the behavior

contract.methods.method().send().then(console.log);

#### Error Logs
-

Versions

  • web3.js: latest
enhancement

Most helpful comment

Man, this breaking change really messed up my codebase :(

All 3 comments

Man, this breaking change really messed up my codebase :(

Yes, I see your point. But the decision was between a working react native production build or this breaking change. This was the reason why I鈥榲e decided to release this breaking change. I鈥榲e apologize for the troubles.

IMO: It would be much better if only strings were returned or required by all methods of web3.

Was this page helpful?
0 / 5 - 0 ratings