Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bad argument in arithmetic expression #63

Open
bchamagne opened this issue Jul 25, 2023 · 1 comment
Open

Bad argument in arithmetic expression #63

bchamagne opened this issue Jul 25, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@bchamagne
Copy link
Member

Describe the problem you discovered

from the logs

ESC[0mESC[36m2023-07-24 21:43:39.758 [debug] HANDLE EVENT
  View: ArchethicPlaygroundWeb.EditorLive
  Event: "parse"
  Parameters: %{"code" => "@version 1\n\ncondition transaction: []\nactions triggered_by: transaction do\n  Contract.se
t_content(\"Hello world!\")\nend\n\n"}
ESC[0mESC[36m2023-07-24 21:43:39.758 [debug] Replied in 163µs
ESC[0mESC[31m2023-07-24 21:43:39.771 [error] GenServer #PID<0.13044.0> terminating
** (ArithmeticError) bad argument in arithmetic expression
    (erts 13.1.2) :erlang.*(nil, 100000000)
    (archethic 1.2.4) lib/archethic/utils.ex:35: Archethic.Utils.to_bigint/1
    (archethic_playground 0.1.0) lib/archethic_playground/transaction.ex:162: anonymous fn/1 in ArchethicPlayground.Transaction.to_archethic/1
    (elixir 1.14.1) lib/enum.ex:1658: Enum."-map/2-lists^map/1-0-"/2
    (archethic_playground 0.1.0) lib/archethic_playground/transaction.ex:159: ArchethicPlayground.Transaction.to_archethic/1
    (archethic_playground 0.1.0) lib/archethic_playground.ex:13: ArchethicPlayground.parse/1
    (archethic_playground 0.1.0) lib/archethic_playground_web/live/editor_live.ex:162: ArchethicPlaygroundWeb.EditorLive.parse_and_get_triggers/1
    (archethic_playground 0.1.0) lib/archethic_playground_web/live/editor_live.ex:70: ArchethicPlaygroundWeb.EditorLive.handle_info/2
    (phoenix_live_view 0.18.16) lib/phoenix_live_view/channel.ex:271: Phoenix.LiveView.Channel.handle_info/2
    (stdlib 4.1.1) gen_server.erl:1123: :gen_server.try_dispatch/4
    (stdlib 4.1.1) gen_server.erl:1200: :gen_server.handle_msg/6
    (stdlib 4.1.1) proc_lib.erl:240: :proc_lib.init_p_do_apply/3

Describe the solution you'd like

No response

Epic

No response

@bchamagne bchamagne added the bug Something isn't working label Jul 25, 2023
@bchamagne
Copy link
Member Author

Happens when we create a UCO transfer, leave every fields empty and then trigger a contract.
It probably behave the same way for all subforms (uco transfer/token transfer/ownership/recipient)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant