resolveDispute method
Future<void>
resolveDispute(
- String tradeId,
- DisputeResult_Winner? winner,
- DisputeResult_Reason? reason,
- String? summaryNotes,
- Int64? customPayoutAmount,
Implementation
Future<void> resolveDispute(String tradeId, DisputeResult_Winner? winner, DisputeResult_Reason? reason, String? summaryNotes, Int64? customPayoutAmount) async {
if (!havenoChannel.isConnected) {
throw DaemonNotConnectedException();
}
Dispute? dispute = await getDispute(tradeId);
if (!dispute!.isOpener) {
throw Exception("You can't close a dispute you didn't open!");
}
try {
await havenoChannel.disputesClient?.resolveDispute(ResolveDisputeRequest(
tradeId: tradeId,
winner: winner,
reason: reason,
summaryNotes: summaryNotes,
customPayoutAmount: customPayoutAmount,
));
getDisputes();
} on GrpcError catch (e) {
handleGrpcError(e);
}
}