SHA256
Добавить переход в server UI и DEVNET topup
This commit is contained in:
@@ -194,3 +194,20 @@ export function wireDeviceAddressPreview(fieldMap) {
|
||||
$(fieldMap.devPub).addEventListener('input', update);
|
||||
update();
|
||||
}
|
||||
|
||||
export function buildDevnetTopupUrl(walletAddress) {
|
||||
const cleanWallet = String(walletAddress || '').trim();
|
||||
const url = new URL('../devnet-topup-view', window.location.href);
|
||||
if (cleanWallet) {
|
||||
url.searchParams.set('wallet', cleanWallet);
|
||||
}
|
||||
return url.toString();
|
||||
}
|
||||
|
||||
export function openDevnetTopup(walletAddress) {
|
||||
const cleanWallet = String(walletAddress || '').trim();
|
||||
if (!cleanWallet) {
|
||||
throw new Error('Сначала укажите device-адрес');
|
||||
}
|
||||
window.open(buildDevnetTopupUrl(cleanWallet), '_blank', 'noopener');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user