Commit 36d90244 authored by Max's avatar Max

Ui/Node: fix empty account (no burn and let 1 udun)

parent 3d06e8c2
......@@ -374,7 +374,7 @@ let forge_empty_account ?base ~get_pk ~src dst =
let ops = get_ops_more ops in
let fees, _, _ = Dune_utils.limits_of_operations ops in
let fix_amount tr =
{tr with node_tr_amount = Int64.sub tr.node_tr_amount fees} in
{tr with node_tr_amount = Int64.(pred (sub tr.node_tr_amount fees))} in
let ops = match ops with
| [ rvl; NTransaction tr ] -> [rvl; NTransaction (fix_amount tr)]
| [ NTransaction tr ] -> [ NTransaction (fix_amount tr) ]
......
......@@ -388,12 +388,7 @@ let mk_op_page ~(confirm: ?msg:'a Js.t -> Metal_types.notif_kind -> unit)
| Dune_types_min.NTransaction {Dune_types_min.node_tr_amount; _} ->
Int64.add acc node_tr_amount
| _ -> acc) 0L ops in
let burn_empty_account = 257_000L in
let amount =
if trd.trd_amount = Int64.minus_one then Int64.sub amount burn_empty_account
else amount in
let burn = Int64.add (Int64.mul 1000L @@ Z.to_int64 storage_limit)
(if trd.trd_amount = Int64.minus_one then burn_empty_account else 0L) in
let burn = Int64.mul 1000L @@ Z.to_int64 storage_limit in
let tr_dst_div =
div ~a:[ a_class [ Display.d_flex ; Flex.flex_row ;
Flex.align_items_center ; Spacing.mb2 ] ] [
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment