toJsonForTxDataContent method

Map<String, dynamic> toJsonForTxDataContent()

Implementation

Map<String, dynamic> toJsonForTxDataContent() {
  final json = <String, dynamic>{
    'name': name,
    'supply': supply,
    'type': type,
    if (decimals != null) 'decimals': decimals,
    'symbol': symbol,
    'properties': properties,
    if (collection.isNotEmpty) 'collection': collection,
    'aeip': aeip,
  };

  if (ownerships != null && ownerships!.isNotEmpty) {
    json['ownerships'] = List<dynamic>.from(
      ownerships!.map((Ownership x) => x.toJson()),
    );
  }

  return json;
}