Skip to content

Commit 0870c09

Browse files
committed
fix: handle initial case
1 parent 42c8094 commit 0870c09

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/algora_web/live/user/transactions_live.ex

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,11 @@ defmodule AlgoraWeb.User.TransactionsLive do
3737
Payments.subscribe()
3838
end
3939

40-
{:ok, account} = Payments.fetch_account(socket.assigns.current_user)
40+
account =
41+
case Payments.fetch_account(socket.assigns.current_user) do
42+
{:ok, account} -> account
43+
{:error, :not_found} -> nil
44+
end
4145

4246
{:ok,
4347
socket

0 commit comments

Comments
 (0)