Compare commits

..

No commits in common. "2a52b593bbca81b3728587dee63bc6db7f7cb279" and "7697417dd8f8afd96df9f1b030818b70bca84272" have entirely different histories.

View File

@ -357,7 +357,9 @@ init(none) ->
Window = gd_gui:start_link(GUI_Prefs), Window = gd_gui:start_link(GUI_Prefs),
Wallets = get_prefs(wallets, Prefs, []), Wallets = get_prefs(wallets, Prefs, []),
ok = hz:timeout(default_tic()), ok = hz:timeout(default_tic()),
State = #s{window = Window, wallets = Wallets, prefs = Prefs}, MS = default_tic(),
T = erlang:send_after(MS, self(), tic),
State = #s{window = Window, timer = {T, MS}, wallets = Wallets, prefs = Prefs},
NewState = do_show_ui(gd_v_wallman, State), NewState = do_show_ui(gd_v_wallman, State),
ok = ok =
case FirstRun of case FirstRun of
@ -1074,7 +1076,7 @@ do_drop_key(ID, State = #s{wallet = W, wallets = Wallets, pass = Pass}) ->
State#s{wallet = NewWallet}. State#s{wallet = NewWallet}.
do_open_wallet(Path, Phrase, State = #s{timer = Timer}) -> do_open_wallet(Path, Phrase, State) ->
Pass = pass(Phrase), Pass = pass(Phrase),
case read(Path, Pass) of case read(Path, Pass) of
{ok, Recovered = #wallet{name = Name, poas = POAs, endpoint = _Node}} -> {ok, Recovered = #wallet{name = Name, poas = POAs, endpoint = _Node}} ->
@ -1086,17 +1088,7 @@ do_open_wallet(Path, Phrase, State = #s{timer = Timer}) ->
% {ok, ChainID} -> gd_gui:chain(ChainID, Node); % {ok, ChainID} -> gd_gui:chain(ChainID, Node);
% Error -> gd_gui:trouble(Error) % Error -> gd_gui:trouble(Error)
% end, % end,
ok = {ok, State#s{pass = Pass, wallet = Recovered}};
case Timer of
none ->
ok;
{OldT, _} ->
_ = erlang:cancel_timer(OldT),
ok
end,
MS = default_tic(),
T = erlang:send_after(200, self(), tic),
{ok, State#s{pass = Pass, wallet = Recovered, timer = {T, MS}}};
Error -> Error ->
{Error, State} {Error, State}
end. end.