send method

  1. @override
Future<String> send({
  1. required String ledger,
  2. required String transaction,
})

Send a base64 encoded signed transaction blob to AlgoSigner to transmit to the Network.

Implementation

@override
Future<String> send({
  required String ledger,
  required String transaction,
}) async {
  Completer<String> c = Completer();
  promiseToFuture(
    algosigner.send(algosigner.SendOptions(
      ledger: ledger,
      tx: transaction,
    )),
  )
      .then(
        (value) => c.complete(convert(value)['txId'] ?? ''),
      )
      .onError((error, stackTrace) => c.completeError(_handleError(error)));

  return c.future;
}