unregisterDisputeAgent method

Future<void> unregisterDisputeAgent(
  1. String disputeAgentType
)

Unregisters a dispute agent from the Haveno server.

Takes disputeAgentType as a parameter to specify the type of dispute agent that needs to be unregistered.

Throws a DaemonNotConnectedException if the havenoChannel is not connected.

Throws specific exceptions depending on the gRPC error encountered.

Example:

await disputeAgentService.unregisterDisputeAgent('mediator');

Implementation

Future<void> unregisterDisputeAgent(String disputeAgentType) async {
  if (!havenoChannel.isConnected) {
    throw DaemonNotConnectedException();
  }
  try {
    await havenoChannel.disputeAgentsClient!.unregisterDisputeAgent(UnregisterDisputeAgentRequest(
      disputeAgentType: disputeAgentType
    ));
  } on GrpcError catch (e) {
    handleGrpcError(e);
  }
}