This commit is contained in:
Craig Everett 2025-04-16 15:58:19 +09:00
parent c7fbe0cb41
commit 5c2fa92060
3 changed files with 34 additions and 30 deletions

View File

@ -486,11 +486,15 @@ code_change(_, State, _) ->
{ok, State}. {ok, State}.
terminate(normal, _) -> terminate(Reason, _) ->
ok = log(info, "Reason: ~p,", [Reason]),
case whereis(gmc_con) of
undefined ->
zx:stop(); zx:stop();
terminate(Reason, State) -> PID ->
ok = log(info, "Reason: ~tp, State: ~tp", [Reason, State]), ok = log(info, "gd_con found at: ~p", [PID]),
zx:stop(). application:stop(gajumine)
end.
@ -882,7 +886,7 @@ do_recover_key(Mnemonic, State) ->
do_recover_key2(Seed, State = #s{wallet = Current, wallets = Wallets, pass = Pass}) -> do_recover_key2(Seed, State = #s{wallet = Current, wallets = Wallets, pass = Pass}) ->
#wallet{name = WalletName, keys = Keys, poas = POAs} = Current, #wallet{name = WalletName, keys = Keys, poas = POAs} = Current,
Recovered = #key{id = ID, name = AccName} = hz_key_master:make_key("", Seed), Recovered = #key{id = ID, name = AccName} = hz_key_master:make_key(Seed),
case lists:keymember(ID, #key.id, Keys) of case lists:keymember(ID, #key.id, Keys) of
false -> false ->
NewKeys = [Recovered | Keys], NewKeys = [Recovered | Keys],

View File

@ -32,7 +32,7 @@
{wx = none :: none | wx:wx_object(), {wx = none :: none | wx:wx_object(),
frame = none :: none | wx:wx_object(), frame = none :: none | wx:wx_object(),
sizer = none :: none | wx:wx_object(), sizer = none :: none | wx:wx_object(),
lang = en :: en | jp, lang = en_US :: en_US | ja_JP,
j = none :: none | fun(), j = none :: none | fun(),
prefs = #{} :: #{atom() := term()}, prefs = #{} :: #{atom() := term()},
accounts = [] :: [gajudesk:poa()], accounts = [] :: [gajudesk:poa()],
@ -84,7 +84,7 @@ start_link(Accounts) ->
init(Prefs) -> init(Prefs) ->
ok = log(info, "GUI starting..."), ok = log(info, "GUI starting..."),
Lang = maps:get(lang, Prefs, en_us), Lang = maps:get(lang, Prefs, en_US),
Trans = gd_jt:read_translations(?MODULE), Trans = gd_jt:read_translations(?MODULE),
J = gd_jt:j(Lang, Trans), J = gd_jt:j(Lang, Trans),