File tree Expand file tree Collapse file tree 2 files changed +22
-2
lines changed
templates/chain-admin/hooks/contract Expand file tree Collapse file tree 2 files changed +22
-2
lines changed Original file line number Diff line number Diff line change @@ -91,9 +91,19 @@ export const useExecuteContractTx = (chainName: string) => {
9191 throw new Error ( 'RPC endpoint is not available' ) ;
9292 }
9393
94+ // Try using the raw Keplr amino signer directly
95+ const chainId = chain . chainId ?? '' ;
96+ const keplrAminoSigner = (
97+ window as any
98+ ) . keplr ?. getOfflineSignerOnlyAmino ( chainId ) ;
99+
100+ if ( ! keplrAminoSigner ) {
101+ throw new Error ( 'Keplr wallet not available' ) ;
102+ }
103+
94104 const signingClient = await getSigningJsdClient ( {
95105 rpcEndpoint,
96- signer : wallet . getOfflineSigner ( chain . chainId ?? '' ) as any ,
106+ signer : keplrAminoSigner as any ,
97107 } ) ;
98108
99109 return signingClient . signAndBroadcast ( address , [ msg ] , fee ) ;
Original file line number Diff line number Diff line change @@ -88,9 +88,19 @@ export const useInstantiateTx = (chainName: string) => {
8888 throw new Error ( 'RPC endpoint is not available' ) ;
8989 }
9090
91+ // Try using the raw Keplr amino signer directly
92+ const chainId = chain . chainId ?? '' ;
93+ const keplrAminoSigner = (
94+ window as any
95+ ) . keplr ?. getOfflineSignerOnlyAmino ( chainId ) ;
96+
97+ if ( ! keplrAminoSigner ) {
98+ throw new Error ( 'Keplr wallet not available' ) ;
99+ }
100+
91101 const signingClient = await getSigningJsdClient ( {
92102 rpcEndpoint,
93- signer : wallet . getOfflineSigner ( chain . chainId ?? '' ) as any ,
103+ signer : keplrAminoSigner as any ,
94104 } ) ;
95105
96106 const msg = jsd . jsd . MessageComposer . fromPartial . instantiate ( {
You can’t perform that action at this time.
0 commit comments