Issue proper explorer URLs
This commit is contained in:
parent
58a58c693f
commit
57a81e7f3f
@ -3,7 +3,8 @@
|
|||||||
{registered,[]},
|
{registered,[]},
|
||||||
{included_applications,[]},
|
{included_applications,[]},
|
||||||
{applications,[stdlib,kernel,sasl,ssl]},
|
{applications,[stdlib,kernel,sasl,ssl]},
|
||||||
{vsn,"0.5.6"},
|
{vsn,"0.6.0"},
|
||||||
{modules,[gajudesk,gd_con,gd_grids,gd_gui,gd_jt,gd_key_master,
|
{modules,[gajudesk,gd_con,gd_grids,gd_gui,gd_jt,
|
||||||
gd_sup,gd_v,gd_v_devman,gd_v_netman,gd_v_wallman]},
|
gd_sophia_editor,gd_sup,gd_v,gd_v_devman,gd_v_netman,
|
||||||
|
gd_v_wallman]},
|
||||||
{mod,{gajudesk,[]}}]}.
|
{mod,{gajudesk,[]}}]}.
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
%%% @end
|
%%% @end
|
||||||
|
|
||||||
-module(gajudesk).
|
-module(gajudesk).
|
||||||
-vsn("0.5.6").
|
-vsn("0.6.0").
|
||||||
-behavior(application).
|
-behavior(application).
|
||||||
-author("Craig Everett <craigeverett@qpq.swiss>").
|
-author("Craig Everett <craigeverett@qpq.swiss>").
|
||||||
-copyright("QPQ AG <info@qpq.swiss>").
|
-copyright("QPQ AG <info@qpq.swiss>").
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
%%% @end
|
%%% @end
|
||||||
|
|
||||||
-module(gd_con).
|
-module(gd_con).
|
||||||
-vsn("0.5.6").
|
-vsn("0.6.0").
|
||||||
-author("Craig Everett <craigeverett@qpq.swiss>").
|
-author("Craig Everett <craigeverett@qpq.swiss>").
|
||||||
-copyright("QPQ AG <info@qpq.swiss>").
|
-copyright("QPQ AG <info@qpq.swiss>").
|
||||||
-license("GPL-3.0-or-later").
|
-license("GPL-3.0-or-later").
|
||||||
@ -11,7 +11,7 @@
|
|||||||
-behavior(gen_server).
|
-behavior(gen_server).
|
||||||
-export([show_ui/1,
|
-export([show_ui/1,
|
||||||
open_wallet/2, close_wallet/0, new_wallet/3, import_wallet/3, drop_wallet/2,
|
open_wallet/2, close_wallet/0, new_wallet/3, import_wallet/3, drop_wallet/2,
|
||||||
selected/1,
|
selected/1, network/0,
|
||||||
password/2,
|
password/2,
|
||||||
refresh/0,
|
refresh/0,
|
||||||
nonce/1, spend/1, chain/1, grids/1, sign_mess/1, sign_tx/1, sign_call/3, dry_run/2,
|
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}).
|
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
|
-spec password(Old, New) -> ok
|
||||||
when Old :: none | string(),
|
when Old :: none | string(),
|
||||||
New :: none | string().
|
New :: none | string().
|
||||||
@ -353,6 +360,9 @@ handle_call(list_keys, _, State) ->
|
|||||||
handle_call({nonce, ID}, _, State) ->
|
handle_call({nonce, ID}, _, State) ->
|
||||||
Response = do_nonce(ID),
|
Response = do_nonce(ID),
|
||||||
{reply, Response, State};
|
{reply, Response, State};
|
||||||
|
handle_call(network, _, State) ->
|
||||||
|
Response = do_network(State),
|
||||||
|
{reply, Response, State};
|
||||||
handle_call({save, Module, Prefs}, _, State) ->
|
handle_call({save, Module, Prefs}, _, State) ->
|
||||||
NewState = do_save(Module, Prefs, State),
|
NewState = do_save(Module, Prefs, State),
|
||||||
{reply, ok, NewState};
|
{reply, ok, NewState};
|
||||||
@ -785,6 +795,12 @@ do_nonce(ID) ->
|
|||||||
hz:next_nonce(ID).
|
hz:next_nonce(ID).
|
||||||
|
|
||||||
|
|
||||||
|
do_network(#s{wallet = none}) ->
|
||||||
|
none;
|
||||||
|
do_network(#s{wallet = #wallet{chain_id = ChainID}}) ->
|
||||||
|
{ok, ChainID}.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
%%% State Operations
|
%%% State Operations
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@
|
|||||||
%%% @end
|
%%% @end
|
||||||
|
|
||||||
-module(gd_grids).
|
-module(gd_grids).
|
||||||
-vsn("0.5.6").
|
-vsn("0.6.0").
|
||||||
-author("Craig Everett <craigeverett@qpq.swiss>").
|
-author("Craig Everett <craigeverett@qpq.swiss>").
|
||||||
-copyright("QPQ AG <info@qpq.swiss>").
|
-copyright("QPQ AG <info@qpq.swiss>").
|
||||||
-license("GPL-3.0-or-later").
|
-license("GPL-3.0-or-later").
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
%%% @end
|
%%% @end
|
||||||
|
|
||||||
-module(gd_gui).
|
-module(gd_gui).
|
||||||
-vsn("0.5.6").
|
-vsn("0.6.0").
|
||||||
-author("Craig Everett <craigeverett@qpq.swiss>").
|
-author("Craig Everett <craigeverett@qpq.swiss>").
|
||||||
-copyright("QPQ AG <info@qpq.swiss>").
|
-copyright("QPQ AG <info@qpq.swiss>").
|
||||||
-license("GPL-3.0-or-later").
|
-license("GPL-3.0-or-later").
|
||||||
@ -691,15 +691,27 @@ copy_to_clipboard(String) ->
|
|||||||
end.
|
end.
|
||||||
|
|
||||||
|
|
||||||
www(State = #s{id = {_, #w{wx = ID_T}}}) ->
|
www(State = #s{id = {_, #w{wx = ID_T}}, j = J}) ->
|
||||||
String = wxStaticText:getLabel(ID_T),
|
case wxStaticText:getLabel(ID_T) of
|
||||||
URL = unicode:characters_to_list(["https://aescan.io/accounts/", String]),
|
"" ->
|
||||||
ok =
|
ok = handle_troubling(State, J("No key selected.")),
|
||||||
case wx_misc:launchDefaultBrowser(URL) of
|
State;
|
||||||
true -> log(info, "Opened in browser: ~ts", [URL]);
|
ID ->
|
||||||
false -> log(info, "Failed to open browser: ~ts", [URL])
|
ok = www2(State, ID),
|
||||||
end,
|
State
|
||||||
State.
|
end.
|
||||||
|
|
||||||
|
www2(State = #s{j = J}, AccountID) ->
|
||||||
|
case gd_con:network() of
|
||||||
|
{ok, ChainID} ->
|
||||||
|
URL = unicode:characters_to_list(["https://", ChainID, ".gajumaru.io/account/", AccountID]),
|
||||||
|
case wx_misc:launchDefaultBrowser(URL) of
|
||||||
|
true -> log(info, "Opened in browser: ~ts", [URL]);
|
||||||
|
false -> log(info, "Failed to open browser: ~ts", [URL])
|
||||||
|
end;
|
||||||
|
none ->
|
||||||
|
handle_troubling(State, J("No chain assigned."))
|
||||||
|
end.
|
||||||
|
|
||||||
|
|
||||||
spend(State = #s{accounts = []}) ->
|
spend(State = #s{accounts = []}) ->
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
%%% translation library is retained).
|
%%% translation library is retained).
|
||||||
|
|
||||||
-module(gd_jt).
|
-module(gd_jt).
|
||||||
-vsn("0.5.6").
|
-vsn("0.6.0").
|
||||||
-export([read_translations/1, j/2, oneshot_j/2]).
|
-export([read_translations/1, j/2, oneshot_j/2]).
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
-module(gd_sophia_editor).
|
-module(gd_sophia_editor).
|
||||||
-vsn("0.5.6").
|
-vsn("0.6.0").
|
||||||
-export([new/1, update/2,
|
-export([new/1, update/2,
|
||||||
get_text/1, set_text/2]).
|
get_text/1, set_text/2]).
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
%%% @end
|
%%% @end
|
||||||
|
|
||||||
-module(gd_sup).
|
-module(gd_sup).
|
||||||
-vsn("0.5.6").
|
-vsn("0.6.0").
|
||||||
-behaviour(supervisor).
|
-behaviour(supervisor).
|
||||||
-author("Craig Everett <craigeverett@qpq.swiss>").
|
-author("Craig Everett <craigeverett@qpq.swiss>").
|
||||||
-copyright("QPQ AG <info@qpq.swiss>").
|
-copyright("QPQ AG <info@qpq.swiss>").
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
-module(gd_v).
|
-module(gd_v).
|
||||||
-vsn("0.5.6").
|
-vsn("0.6.0").
|
||||||
-author("Craig Everett <craigeverett@qpq.swiss>").
|
-author("Craig Everett <craigeverett@qpq.swiss>").
|
||||||
-copyright("QPQ AG <info@qpq.swiss>").
|
-copyright("QPQ AG <info@qpq.swiss>").
|
||||||
-license("GPL-3.0-or-later").
|
-license("GPL-3.0-or-later").
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
-module(gd_v_devman).
|
-module(gd_v_devman).
|
||||||
-vsn("0.5.6").
|
-vsn("0.6.0").
|
||||||
-author("Craig Everett <craigeverett@qpq.swiss>").
|
-author("Craig Everett <craigeverett@qpq.swiss>").
|
||||||
-copyright("QPQ AG <info@qpq.swiss>").
|
-copyright("QPQ AG <info@qpq.swiss>").
|
||||||
-license("GPL-3.0-or-later").
|
-license("GPL-3.0-or-later").
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
-module(gd_v_netman).
|
-module(gd_v_netman).
|
||||||
-vsn("0.5.6").
|
-vsn("0.6.0").
|
||||||
-author("Craig Everett <zxq9@zxq9.com>").
|
-author("Craig Everett <zxq9@zxq9.com>").
|
||||||
-copyright("QPQ AG <info@qpq.swiss>").
|
-copyright("QPQ AG <info@qpq.swiss>").
|
||||||
-license("GPL-3.0-or-later").
|
-license("GPL-3.0-or-later").
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
-module(gd_v_wallman).
|
-module(gd_v_wallman).
|
||||||
-vsn("0.5.6").
|
-vsn("0.6.0").
|
||||||
-author("Craig Everett <zxq9@zxq9.com>").
|
-author("Craig Everett <zxq9@zxq9.com>").
|
||||||
-copyright("QPQ AG <info@qpq.swiss>").
|
-copyright("QPQ AG <info@qpq.swiss>").
|
||||||
-license("GPL-3.0-or-later").
|
-license("GPL-3.0-or-later").
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
{name,"GajuDesk"}.
|
{name,"GajuDesk"}.
|
||||||
{type,gui}.
|
{type,gui}.
|
||||||
{modules,[]}.
|
{modules,[]}.
|
||||||
{author,"Craig Everett"}.
|
|
||||||
{prefix,"gd"}.
|
{prefix,"gd"}.
|
||||||
{desc,"A desktop client for the Gajumaru network of blockchain networks"}.
|
{desc,"A desktop client for the Gajumaru network of blockchain networks"}.
|
||||||
{package_id,{"otpr","gajudesk",{0,5,6}}}.
|
{author,"Craig Everett"}.
|
||||||
|
{package_id,{"otpr","gajudesk",{0,6,0}}}.
|
||||||
{deps,[{"otpr","hakuzaru",{0,6,1}},
|
{deps,[{"otpr","hakuzaru",{0,6,1}},
|
||||||
{"otpr","eblake2",{1,0,1}},
|
{"otpr","eblake2",{1,0,1}},
|
||||||
{"otpr","base58",{0,1,1}},
|
{"otpr","base58",{0,1,1}},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user