File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -1013,13 +1013,15 @@ def build_tx( # noqa: C901
1013
1013
* self ._clusterlib_obj .magic_args ,
1014
1014
* self ._clusterlib_obj .socket_args ,
1015
1015
]
1016
- stdout = self ._clusterlib_obj .cli (cli_args ).stdout
1016
+ stdout = self ._clusterlib_obj .cli (cli_args ).stdout . strip ()
1017
1017
stdout_dec = stdout .decode ("utf-8" ) if stdout else ""
1018
1018
1019
- # check for the presence of fee information so compatibility with older versions
1020
- # of the `build` command is preserved
1019
+ # Check for the presence of fee information. No fee information was provided in older
1020
+ # versions of the `build` command.
1021
1021
estimated_fee = - 1
1022
- if "transaction fee" in stdout_dec :
1022
+ if stdout_dec .endswith ("Lovelace" ):
1023
+ estimated_fee = int (stdout_dec .split ()[- 2 ])
1024
+ elif "transaction fee" in stdout_dec :
1023
1025
estimated_fee = int (stdout_dec .split ()[- 1 ])
1024
1026
1025
1027
return structs .TxRawOutput (
You can’t perform that action at this time.
0 commit comments