diff options
-rw-r--r-- | packages/base-contract/CHANGELOG.json | 8 | ||||
-rw-r--r-- | packages/base-contract/src/index.ts | 2 |
2 files changed, 9 insertions, 1 deletions
diff --git a/packages/base-contract/CHANGELOG.json b/packages/base-contract/CHANGELOG.json index 89580ca90..296a4a06c 100644 --- a/packages/base-contract/CHANGELOG.json +++ b/packages/base-contract/CHANGELOG.json @@ -1,5 +1,13 @@ [ { + "version": "3.0.0", + "changes": [ + { + "note": "Change the way we detect BN to work with the newest ethers.js" + } + ] + }, + { "timestamp": 1536142250, "version": "2.0.2", "changes": [ diff --git a/packages/base-contract/src/index.ts b/packages/base-contract/src/index.ts index 35c830a46..90e576c24 100644 --- a/packages/base-contract/src/index.ts +++ b/packages/base-contract/src/index.ts @@ -61,7 +61,7 @@ export class BaseContract { } } protected static _bnToBigNumber(_type: string, value: any): any { - return _.isObject(value) && value._bn ? new BigNumber(value.toString()) : value; + return _.isObject(value) && value._hex ? new BigNumber(value.toString()) : value; } protected static async _applyDefaultsToTxDataAsync<T extends Partial<TxData | TxDataPayable>>( txData: T, |