toTxRep method

void toTxRep(
  1. String prefix,
  2. List<String> lines
)

Implementation

void toTxRep(String prefix, List<String> lines) {
  if (_inflationDest != null) {
    lines.add('$prefix.inflationDest._present: true');
    lines.add(
      '$prefix.inflationDest: ${TxRepHelper.formatAccountId(_inflationDest!)}',
    );
  } else {
    lines.add('$prefix.inflationDest._present: false');
  }
  if (_clearFlags != null) {
    lines.add('$prefix.clearFlags._present: true');
    _clearFlags!.toTxRep('$prefix.clearFlags', lines);
  } else {
    lines.add('$prefix.clearFlags._present: false');
  }
  if (_setFlags != null) {
    lines.add('$prefix.setFlags._present: true');
    _setFlags!.toTxRep('$prefix.setFlags', lines);
  } else {
    lines.add('$prefix.setFlags._present: false');
  }
  if (_masterWeight != null) {
    lines.add('$prefix.masterWeight._present: true');
    _masterWeight!.toTxRep('$prefix.masterWeight', lines);
  } else {
    lines.add('$prefix.masterWeight._present: false');
  }
  if (_lowThreshold != null) {
    lines.add('$prefix.lowThreshold._present: true');
    _lowThreshold!.toTxRep('$prefix.lowThreshold', lines);
  } else {
    lines.add('$prefix.lowThreshold._present: false');
  }
  if (_medThreshold != null) {
    lines.add('$prefix.medThreshold._present: true');
    _medThreshold!.toTxRep('$prefix.medThreshold', lines);
  } else {
    lines.add('$prefix.medThreshold._present: false');
  }
  if (_highThreshold != null) {
    lines.add('$prefix.highThreshold._present: true');
    _highThreshold!.toTxRep('$prefix.highThreshold', lines);
  } else {
    lines.add('$prefix.highThreshold._present: false');
  }
  if (_homeDomain != null) {
    lines.add('$prefix.homeDomain._present: true');
    _homeDomain!.toTxRep('$prefix.homeDomain', lines);
  } else {
    lines.add('$prefix.homeDomain._present: false');
  }
  if (_signer != null) {
    lines.add('$prefix.signer._present: true');
    _signer!.toTxRep('$prefix.signer', lines);
  } else {
    lines.add('$prefix.signer._present: false');
  }
}