Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export async function cosmosGetAddress (transport: KeepKeyTransport, msg: Core.CosmosGetAddress): Promise {
const getAddr = new CosmosGetAddress()
getAddr.setAddressNList(msg.addressNList)
getAddr.setShowDisplay(msg.showDisplay !== false)
const response = await transport.call(MessageType.MESSAGETYPE_COSMOSGETADDRESS, getAddr, Core.LONG_TIMEOUT)
if (response.message_type === Core.Events.FAILURE) throw response
const cosmosAddress = response.proto as CosmosAddress
return cosmosAddress.getAddress()
}