using amimo for keplr signing

This commit is contained in:
liangping 2022-09-19 07:49:59 +08:00
parent 4e31f055d3
commit f299d8229e

View File

@ -247,10 +247,11 @@ export async function sign(device, chainId, signerAddress, messages, fee, memo,
throw new Error('Please install keplr extension')
}
await window.keplr.enable(chainId)
const signer = window.getOfflineSigner(chainId)
if (isEvmosBasedChain(chainId)) {
const signer = window.getOfflineSigner(chainId)
client = await SigningKeplerEthermintClient.offline(signer)
} else {
const signer = window.getOfflineSignerOnlyAmino(chainId)
client = await SigningStargateClient.offline(signer)
}
}