Skip to content

Commit

Permalink
fix: allow same creation block to be used on by-hash aex9 balances (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
sborrazas committed Mar 14, 2024
1 parent 4f80b8b commit 797b1ef
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/ae_mdw_web/controllers/aex9_controller.ex
Expand Up @@ -378,7 +378,9 @@ defmodule AeMdwWeb.Aex9Controller do
with {:ok, ct_pk} <- Validate.id(ct_id, [:contract_pubkey]),
{:ok, Model.aexn_contract(txi_idx: {txi, _idx})} <-
State.get(state, Model.AexnContract, {:aex9, ct_pk}) do
if txi < Util.block_txi(state, block_index) do
Model.tx(block_index: contract_block_index) = State.fetch!(state, Model.Tx, txi)

if contract_block_index <= block_index do
{:ok, ct_pk}
else
{:error, ErrInput.NotFound.exception(value: ct_id)}
Expand Down

0 comments on commit 797b1ef

Please sign in to comment.