confirmPaymentSent method

Future<TradeInfo?> confirmPaymentSent(
  1. String tradeId
)

Confirms that the payment has been sent for a specific trade.

Sends a ConfirmPaymentSentRequest to mark the payment as sent. If the client is not connected, a DaemonNotConnectedException is thrown.

Example:

await tradesService.confirmPaymentSent('tradeId');

Returns:

  • A Future containing the updated TradeInfo after confirming payment.

Implementation

Future<TradeInfo?> confirmPaymentSent(String tradeId) async {
  if (!havenoChannel.isConnected) {
    throw DaemonNotConnectedException();
  }
  try {
    await havenoChannel.tradesClient!
        .confirmPaymentSent(ConfirmPaymentSentRequest(tradeId: tradeId));
    await getTrade(tradeId);
  } on GrpcError catch (e) {
    handleGrpcError(e);
  }
  return null;
}