Skip to content

Commit

Permalink
tiny fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Muhammad-Altabba committed Dec 13, 2023
1 parent 98c68e1 commit a95bfac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/web3-eth-contract/src/contract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -485,10 +485,10 @@ export class Contract<Abi extends ContractAbi>
});

// Init protected properties
if ((contractContext as Web3Context).wallet) {
if ((contractContext as Web3Context)?.wallet) {
this._wallet = (contractContext as Web3Context).wallet;

Check warning on line 489 in packages/web3-eth-contract/src/contract.ts

View check run for this annotation

Codecov / codecov/patch

packages/web3-eth-contract/src/contract.ts#L489

Added line #L489 was not covered by tests
}
if ((contractContext as Web3Context).accountProvider) {
if ((contractContext as Web3Context)?.accountProvider) {
this._accountProvider = (contractContext as Web3Context).accountProvider;

Check warning on line 492 in packages/web3-eth-contract/src/contract.ts

View check run for this annotation

Codecov / codecov/patch

packages/web3-eth-contract/src/contract.ts#L492

Added line #L492 was not covered by tests
}

Expand Down

0 comments on commit a95bfac

Please sign in to comment.