Skip to content

Commit

Permalink
Fixed deferred filters after unsafe-eval changes (ethers-io#3749, eth…
Browse files Browse the repository at this point in the history
  • Loading branch information
ricmoo authored and Woodpile37 committed Jan 14, 2024
1 parent ce39511 commit 741008a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src.ts/contract/contract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ function buildWrappedMethod<A extends Array<any> = Array<any>, R = any, D extend
// Only works on non-ambiguous keys (refined fragment is always non-ambiguous)
Object.defineProperty(method, "fragment", {
configurable: false,
enumerable: false,
enumerable: true,
get: () => {
const fragment = contract.interface.getFunction(key);
assert(fragment, "no matching fragment", "UNSUPPORTED_OPERATION", {
Expand All @@ -434,7 +434,7 @@ function buildWrappedEvent<A extends Array<any> = Array<any>>(contract: BaseCont
return fragment;
}

const method = async function(...args: ContractMethodArgs<A>): Promise<PreparedTopicFilter> {
const method = function(...args: ContractMethodArgs<A>): PreparedTopicFilter {
return new PreparedTopicFilter(contract, getFragment(...args), args);
};

Expand All @@ -448,7 +448,7 @@ function buildWrappedEvent<A extends Array<any> = Array<any>>(contract: BaseCont
// Only works on non-ambiguous keys (refined fragment is always non-ambiguous)
Object.defineProperty(method, "fragment", {
configurable: false,
enumerable: false,
enumerable: true,
get: () => {
const fragment = contract.interface.getEvent(key);

Expand Down

0 comments on commit 741008a

Please sign in to comment.