Issue proper explorer URLs

This commit is contained in:
2025-04-30 17:39:26 +09:00
parent 58a58c693f
commit 57a81e7f3f
13 changed files with 55 additions and 26 deletions
+18 -2
View File
@@ -3,7 +3,7 @@
%%% @end
-module(gd_con).
-vsn("0.5.6").
-vsn("0.6.0").
-author("Craig Everett <craigeverett@qpq.swiss>").
-copyright("QPQ AG <info@qpq.swiss>").
-license("GPL-3.0-or-later").
@@ -11,7 +11,7 @@
-behavior(gen_server).
-export([show_ui/1,
open_wallet/2, close_wallet/0, new_wallet/3, import_wallet/3, drop_wallet/2,
selected/1,
selected/1, network/0,
password/2,
refresh/0,
nonce/1, spend/1, chain/1, grids/1, sign_mess/1, sign_tx/1, sign_call/3, dry_run/2,
@@ -112,6 +112,13 @@ selected(Index) ->
gen_server:cast(?MODULE, {selected, Index}).
-spec network() -> {ok, NetworkID} | none
when NetworkID :: binary().
network() ->
gen_server:call(?MODULE, network).
-spec password(Old, New) -> ok
when Old :: none | string(),
New :: none | string().
@@ -353,6 +360,9 @@ handle_call(list_keys, _, State) ->
handle_call({nonce, ID}, _, State) ->
Response = do_nonce(ID),
{reply, Response, State};
handle_call(network, _, State) ->
Response = do_network(State),
{reply, Response, State};
handle_call({save, Module, Prefs}, _, State) ->
NewState = do_save(Module, Prefs, State),
{reply, ok, NewState};
@@ -785,6 +795,12 @@ do_nonce(ID) ->
hz:next_nonce(ID).
do_network(#s{wallet = none}) ->
none;
do_network(#s{wallet = #wallet{chain_id = ChainID}}) ->
{ok, ChainID}.
%%% State Operations