We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 16328a4 commit c668b4cCopy full SHA for c668b4c
lib/src/schema/unstake_body.dart
@@ -68,12 +68,19 @@ class UnstakeBody extends GeneratedMessage {
68
asHex: asHex,
69
));
70
71
- Map<String, dynamic> jsonMap({bool asHex = false}) => {
72
- "operator": operator.address,
73
- "withdrawal": withdrawal.jsonMap(asHex: asHex),
74
- "fee": fee.toInt(),
75
- "nonce": nonce.toInt(),
76
- };
+ Map<String, dynamic> jsonMap({bool asHex = false}) {
+ Map<String, dynamic> data = {
+ "operator": operator.address,
+ "withdrawal": withdrawal.jsonMap(asHex: asHex),
+ "nonce": nonce.toInt(),
+ };
77
+
78
+ if (fee > 0) {
79
+ data['fee'] = fee.toInt();
80
+ }
81
82
+ return data;
83
84
85
Uint8List get pbBytes => writeToBuffer();
86
0 commit comments