isHost function

dynamic isHost({
  1. required String hostAddress,
  2. required String errorMessage,
})

Verifies if the local user's address matches the host's address. If not, throws an exception with a custom error message.

Implementation

isHost({required String hostAddress, required String errorMessage}) {
  final localAddress = getCachedWallet()!.address!;

  if (localAddress != pCAIP10ToWallet(hostAddress)) {
    throw Exception(errorMessage);
  }
}