Some time ago I received information that I could directly go to an account using a paeameter in the client's URL. Eg:
https://ardor.jelurida.com/index.html?account=ARDOR-X28W-VWKY-YEKK-4XSZ5&chain=IGNIS
Is there a complete list of supported parameters?
In my specific case I would like to point to a specific transaction.
Thanks
I don't think there is documentation for this feature. I guess because it is not polished enough. But here are the basics:
-
The
account
parameter - as you already know it will login into a specific account. -
chain
- in conjunction with theaccount
parameter will set the chain on login. If not provided the ARDR chain is used. -
page
- show specific page AFTER login. So ifaccount
is not provided, the login page is first displayed and after the user login somehow, the specified page is displayed (unless the user modify the URL in the meantime).
Now, for a complete list of pages you need to search the code. All pages are in theNRS.pages
object, so if you search forNRS.pages.
you should be able to find the page name.
Then some pages require specific information to be provided. For example if you openasset_exchange
you must provide the asset ID asasset
URL parameter. This specific page (together with thecoin_exchange
page) is made more user friendly and displays an error if opened via URL which misses the necessary parameter(s). But for the rest of the pages such checks are not implemented, so you will get a JS error (if anything). Some examples:-
https://testardor.jelurida.com/index.html?account=ARDOR-J24K-QWD8-XHEX-36P7X&chain=IGNIS&page=asset_exchange&asset=10298065598261473225#
Login with some account and open the asset_exchange for certain asset -
https://testardor.jelurida.com/index.html?account=ARDOR-J24K-QWD8-XHEX-36P7X&chain=IGNIS&page=coin_exchange&coin=1
Login with some account and open the coin_exchange for IGNIS to ARDR. Notice that the exchanged coin must be provided as chain ID, not chain name -
https://testardor.jelurida.com/index.html?account=ARDOR-J24K-QWD8-XHEX-36P7X&chain=IGNIS&page=open_orders
Go to the open asset orders
-
-
modal
- show specific modal by it's element ID AFTER login. Again ifaccount
is not provided, the login page is first displayed and after the user login somehow, the specified modal is displayed. To get the element ID of some modal you need to again look into the code or use the inspect tool. This is the ID of the top-most<div>
element. It should also have classmodal
. You can fill any of the inputs of the modal by providing a parameter with the input name. You can also set check boxes or provide internal "data" attributes to the modal. For example
https://testardor.jelurida.com/index.html?account=ARDOR-J24K-QWD8-XHEX-36P7X&chain=IGNIS&modal=send_money_modal&recipient=ARDOR-S9Q3-GPL9-XLPB-EDW66&amountNXT=100
WIll open the Send Money modal and prefill the recipient and the amount
Modals require even more parameters in order work properly and if you don't provide some of them you will probably get a JS error. Also I see that hidden fields are not filled by parameters. This is yet another bug in this feature which prevents to open some of the modals.
About your specific question, this seems to do the trick:
https://testardor.jelurida.com/index.html?account=ARDOR-J24K-QWD8-XHEX-36P7X&chain=IGNIS&modal=transaction_info_modal&fullHash=98fcb67163e1de9e561e3e71dca0820c465cde94f0142a4d139dd3d2b5fc9611
But weird why the modal cannot be closed afterwards - probably another bug -
Finally there is a
lifetime_modal
parameter which opens a modal and only that. When the modal is closed, there is empty page. Can be used only with modals that are available before login.
Awesome! Thanks Petko. Will try that tomorrow.
And Happy New Year!
Hi Petko
Looks good to me. I can close the modal and the page is not empty:
https://test30.smartvoting.io:16877/index.html?account=ARDOR-7CSC-V39P-6B5W-9BGSE&chain=BITSWIFT&modal=transaction_info_modal&fullHash=667558428debd55c3740e6630b92723313af0883bc510de817e79e43cc27c1da
Happy New Year!
This is what happens on my side
The dialog is opened twice and the screen is dimmed twice. Then when I close the dialog the screen remains dimmed. I fixed it for the next release
Very strange.
It works for me with both Firefox and Chrome.
I'm on Windows 10.
Did the same for me FYI on Firefox for windows
You mean that also your screen gets stuck when you dismiss the pop-up?
Very strange. I'll try on my other PCs tomorrow.
Yes, but sounds like petko already fixed the issue for next release so I wouldn't spend time on it. I just wanted to see what the link did
Yes, I fixed it. If you cannot wait for the release, you can fix it on your side by adding
let infoModal = $('#transaction_info_modal');
if (infoModal && infoModal.data('bs.modal')) {
isModalVisible = infoModal.data('bs.modal').isShown;
}
in the beginning of NRS.processTransactionModalData
Sorry Petko, so you have a url for an asset info modal? I tried some things but didn't manage.
I guess you are asking about this modal
Unfortunately I cannot provide a link too. The modal requires an action class and I cannot set it from URL parameters. I can fix this for the next release. For now I would suggest that you link to the asset issuance transaction. I contains almost the same data.
Perfect! makes sense. I'll do that!