From f9137d2b763ae411e7e7b22d69bc3bdf5e657df2 Mon Sep 17 00:00:00 2001 From: parodyBit <58690522+parodyBit@users.noreply.github.com> Date: Mon, 24 Mar 2025 09:24:00 -0600 Subject: [PATCH] fix: unstake body fee --- lib/src/schema/unstake_body.dart | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/lib/src/schema/unstake_body.dart b/lib/src/schema/unstake_body.dart index 98ddcaf..f7ac86d 100644 --- a/lib/src/schema/unstake_body.dart +++ b/lib/src/schema/unstake_body.dart @@ -68,12 +68,15 @@ class UnstakeBody extends GeneratedMessage { asHex: asHex, )); - Map jsonMap({bool asHex = false}) => { - "operator": operator.address, - "withdrawal": withdrawal.jsonMap(asHex: asHex), - "fee": fee.toInt(), - "nonce": nonce.toInt(), - }; + Map jsonMap({bool asHex = false}) { + Map data = { + "operator": operator.address, + "withdrawal": withdrawal.jsonMap(asHex: asHex), + "nonce": nonce.toInt(), + "fee": fee.toInt() > 0 ? fee.toInt() : null + }; + return data; + } Uint8List get pbBytes => writeToBuffer();