Skip to content

Commit 92b45fb

Browse files
committed
fix: allow null fee when parsing from json
1 parent a2769a4 commit 92b45fb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/src/schema/unstake_body.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ class UnstakeBody extends GeneratedMessage {
5757
factory UnstakeBody.fromJson(Map<String, dynamic> json) => UnstakeBody(
5858
operator: PublicKeyHash.fromAddress(json["operator"]),
5959
withdrawal: ValueTransferOutput.fromJson(json["withdrawal"]),
60-
fee: int.parse(json["fee"]),
61-
nonce: int.parse(json["nonce"]),
60+
fee: json.containsKey('fee') ? json["fee"] : null,
61+
nonce: json["nonce"],
6262
);
6363

6464
factory UnstakeBody.fromPbBytes(Uint8List buffer) =>

0 commit comments

Comments
 (0)