Skip to content

Commit

Permalink
skip callFrom for call & callFrom
Browse files Browse the repository at this point in the history
  • Loading branch information
karooolis committed Mar 27, 2024
1 parent 4473d30 commit 80222e3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/world/ts/actions/callFrom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,12 @@ export function callFrom<TChain extends Chain, TAccount extends Account>(
// Applies to: `client.writeContract`, `getContract(client, ...).write`
writeContract: async (writeArgs): Promise<WriteContractReturnType> => {
// Skip if the contract isn't the World.
if (writeArgs.address !== params.worldAddress || writeArgs.functionName === "registerDelegationWithSignature") {
if (
writeArgs.address !== params.worldAddress ||
writeArgs.functionName === "call" ||
writeArgs.functionName === "callFrom" ||
writeArgs.functionName === "registerDelegationWithSignature"
) {
return getAction(client, writeContract, "writeContract")(writeArgs);
}

Expand Down

0 comments on commit 80222e3

Please sign in to comment.