From 5083eb624ffb70819a73ae8d3ba6567b0e48f744 Mon Sep 17 00:00:00 2001 From: Burnt Val Date: Fri, 24 Feb 2023 11:12:08 -0500 Subject: [PATCH] added memo --- packages/graz/src/actions/methods.ts | 4 +++- packages/graz/src/hooks/methods.ts | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/graz/src/actions/methods.ts b/packages/graz/src/actions/methods.ts index 778d33d9..765da1a1 100644 --- a/packages/graz/src/actions/methods.ts +++ b/packages/graz/src/actions/methods.ts @@ -139,6 +139,7 @@ export interface ExecuteContractArgs> { senderAddress: string; contractAddress: string; funds: Coin[]; + memo: string | undefined; } export type ExecuteContractMutationArgs> = Omit< @@ -154,6 +155,7 @@ export const executeContract = async >({ fee, contractAddress, funds, + memo, }: ExecuteContractArgs) => { const { signingClients } = useGrazStore.getState(); @@ -161,7 +163,7 @@ export const executeContract = async >({ throw new Error("CosmWasm signing client is not ready"); } - return signingClients.cosmWasm.execute(senderAddress, contractAddress, msg, fee, funds); + return signingClients.cosmWasm.execute(senderAddress, contractAddress, msg, fee, memo, funds); }; export const getQuerySmart = async (address: string, queryMsg: Record): Promise => { diff --git a/packages/graz/src/hooks/methods.ts b/packages/graz/src/hooks/methods.ts index dcbeee41..0d5cbf67 100644 --- a/packages/graz/src/hooks/methods.ts +++ b/packages/graz/src/hooks/methods.ts @@ -222,7 +222,7 @@ export const useExecuteContract = >({ fee: args.fee ?? "auto", senderAddress: accountAddress, contractAddress, - funds: args.funds ?? [], + funds: args.funds || [], }; return executeContract(executeArgs);