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) => {
91
91
throw new Error ( 'RPC endpoint is not available' ) ;
92
92
}
93
93
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
+
94
104
const signingClient = await getSigningJsdClient ( {
95
105
rpcEndpoint,
96
- signer : wallet . getOfflineSigner ( chain . chainId ?? '' ) as any ,
106
+ signer : keplrAminoSigner as any ,
97
107
} ) ;
98
108
99
109
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) => {
88
88
throw new Error ( 'RPC endpoint is not available' ) ;
89
89
}
90
90
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
+
91
101
const signingClient = await getSigningJsdClient ( {
92
102
rpcEndpoint,
93
- signer : wallet . getOfflineSigner ( chain . chainId ?? '' ) as any ,
103
+ signer : keplrAminoSigner as any ,
94
104
} ) ;
95
105
96
106
const msg = jsd . jsd . MessageComposer . fromPartial . instantiate ( {
You can’t perform that action at this time.
0 commit comments