builder static method

Builds PathPaymentStrictReceiveOperation operation.

Implementation

static PathPaymentStrictReceiveOperationBuilder builder(
    XdrPathPaymentStrictReceiveOp op) {
  List<Asset> path = List<Asset>.empty(growable: true);
  for (int i = 0; i < op.path.length; i++) {
    path.add(Asset.fromXdr(op.path[i]));
  }
  return PathPaymentStrictReceiveOperationBuilder.forMuxedDestinationAccount(
          Asset.fromXdr(op.sendAsset),
          Operation.fromXdrAmount(op.sendMax.int64),
          MuxedAccount.fromXdr(op.destination),
          Asset.fromXdr(op.destAsset),
          Operation.fromXdrAmount(op.destAmount.int64))
      .setPath(path);
}