toJson method
Implementation
Map<String, dynamic> toJson() {
var res = {
"TxTooOld": TxTooOld,
"BadFee": BadFee,
"TxDuplicate": TxDuplicate,
"InsufficientFunds": InsufficientFunds,
"TxCreatedInFuture": TxCreatedInFuture
}..removeWhere((dynamic key, dynamic value) =>
key == null || value == null || value == false);
if (res["TxCreatedInFuture"] != null && res["TxCreatedInFuture"] == true) {
res.update("TxCreatedInFuture", (value) => null);
}
return res;
}