withdrawFunds method
Withdraws funds for a specific trade to the specified address.
Sends a WithdrawFundsRequest to withdraw funds from the trade. If the client is not connected, a DaemonNotConnectedException is thrown.
Example:
await tradesService.withdrawFunds('tradeId', 'address', 'memo');
Implementation
Future<void> withdrawFunds(
String? tradeId, String? address, String? memo) async {
if (!havenoChannel.isConnected) {
throw DaemonNotConnectedException();
}
try {
await havenoChannel.tradesClient!.withdrawFunds(
WithdrawFundsRequest(tradeId: tradeId, address: address, memo: memo));
} on GrpcError catch (e) {
handleGrpcError(e);
}
}