toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final res = {
    'TxTooOld': txTooOld,
    'BadFee': badFee,
    'TxDuplicate': txDuplicate,
    'InsufficientFunds': insufficientFunds,
    'TxCreatedInFuture': txCreatedInFuture,
  }..removeWhere((key, value) => value == null || value == false);
  if (res['TxCreatedInFuture'] != null && res['TxCreatedInFuture'] == true) {
    res.update('TxCreatedInFuture', (value) => null);
  }
  return res;
}