Skip to content

Commit

Permalink
fix: add invoke warning
Browse files Browse the repository at this point in the history
  • Loading branch information
badurinantun committed Jul 13, 2022
1 parent b7291e6 commit 34db683
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 0 additions & 1 deletion src/account/default.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ export class Account extends Provider implements AccountInterface {
const { result } = await this.callContract({
contractAddress: this.address,
entrypoint: 'get_nonce',
calldata: [],
});
return toHex(toBN(result[0]));
}
Expand Down
3 changes: 2 additions & 1 deletion src/contract/default.ts
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,8 @@ export class Contract implements ContractInterface {
});
}

// TODO: throw warning
console.warn(`Invoking ${method} without an account. This will not work on a public node.`);

return this.providerOrAccount.invokeFunction({
...invocation,
signature: options.signature || [],
Expand Down

0 comments on commit 34db683

Please sign in to comment.