let storageProtocol = self.web3Auth!.state as! any EthereumSingleKeyStorageProtocol
let userEthAddress = try EthereumAccount(keyStorage: storageProtocol).address.toChecksumAddress()
I got error:
Could not cast value of type 'Web3Auth.Web3AuthState' (0x106985098) to 'web3.EthereumSingleKeyStorageProtocol' (0x11defecf0).
However, I found the code example (https://github.com/Web3Auth/web3auth-pnp-examples/blob/4341c65480b3a106ed1724c6b96bad76d28a4b85/ios/ios-quick-start/ios-example/web3RPC.swift#L27) is doing this.
What did I do wrong? thanks!