Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

Contract calls should return a BigNumber object #2568

Merged
merged 4 commits into from
Mar 25, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 1 addition & 11 deletions packages/web3-eth-abi/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,6 @@ import EthAbiCoder from './AbiCoder.js';
export function AbiCoder() {
return new EthAbiCoder(
Utils,
// TODO: Change this anonymous method to a accessable method because of the testing.
new EthersAbiCoder((type, value) => {
if (
(type.match(/^u?int/) && !isArray(value) && !isObject(value)) ||
value.constructor.name === 'BigNumber'
) {
return value.toString();
}

return value;
})
new EthersAbiCoder()
);
}