fromXdr method Null safety

AuthorizedInvocation fromXdr(
  1. XdrAuthorizedInvocation xdr
)

Implementation

static AuthorizedInvocation fromXdr(XdrAuthorizedInvocation xdr) {
  List<AuthorizedInvocation> subInvocations =
      List<AuthorizedInvocation>.empty(growable: true);
  for (XdrAuthorizedInvocation subXdr in xdr.subInvocations) {
    subInvocations.add(AuthorizedInvocation.fromXdr(subXdr));
  }
  String contractId = Util.bytesToHex(xdr.contractID.hash);
  return AuthorizedInvocation(contractId, xdr.functionName,
      args: xdr.args, subInvocations: subInvocations);
}