Skip to content

Conversation

roienatan
Copy link
Contributor

@roienatan roienatan commented Sep 19, 2020

resolves: #529 (ethers BigNumber instead of BN)
resolves: #501

Still many errors.
Migration reference: https://docs.ethers.io/v5/migration/

@roienatan roienatan changed the title Use ethers big number Upgrade to ethers 5 and use BigNumber instead of BN Sep 19, 2020
public approveTokens(tokenAddress: Address, spender: Address, amount: BN) {
const signer = (this.web3 as JsonRpcProvider).getSigner(this.defaultAccount as any)
public approveTokens(tokenAddress: Address, spender: Address, amount: BigNumber) {
const signer = (this.web3 as providers.JsonRpcProvider).getSigner(this.defaultAccount as any)
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do you have to cast here? IF you have to cast, would it be better that it be to BaseProvider?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Firstly I try to make the obvious changes to make arc.js work and the tests pass.

export type Web3Provider = string | AsyncSendable | Signer
export type Web3Client = JsonRpcProvider | EthersWeb3JsProvider
export type Web3Provider = string | Signer // AsyncSendable
export type Web3Client = providers.JsonRpcProvider | providers.Web3Provider //| EthersWeb3JsProvider
Copy link
Contributor

Choose a reason for hiding this comment

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

would BaseProvider be easier here?

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.

2 participants