Error in ABI message assertion (#1552)
* combine values * undefined name
This commit is contained in:
committed by
Jaco Greeff
parent
a52c629ecf
commit
479c742471
@@ -42,7 +42,7 @@ export abstract class Base<ApiType extends ApiTypes> implements ContractBase<Api
|
||||
: this.abi.abi.contract.messages.findIndex((message): boolean => nameOrIndex === message.name || nameOrIndex === stringCamelCase(message.name))
|
||||
: 0;
|
||||
const def = this.abi.abi.contract.messages[index];
|
||||
assert(!!def, `Attempted to access a contract message that does not exist: ${name}`);
|
||||
assert(!!def, `Attempted to access a contract message that does not exist: ${typeof nameOrIndex === 'number' ? `index ${nameOrIndex}` : nameOrIndex}`);
|
||||
|
||||
const fn = this.abi.messages[def.name] || this.abi.messages[stringCamelCase(def.name)];
|
||||
return { index, def, fn };
|
||||
|
||||
Reference in New Issue
Block a user