Files
pezkuwi-ui/packages/ui-settings
Satoshi Qazi Muhammed 9f4b5ff112 Depend on @pezkuwi/* 14.0.26 and release 3.17.3
- dependencies on keyring, networks, util and util-crypto require
  ^14.0.26, the release on wasm-crypto 7.5.20 (ed25519, secp256k1,
  derivation and bip39 implemented; 7.5.18 had them as stubs).
  ui-keyring creates and derives accounts through these, so the floor
  matters there. peerDependencies stay "*".
- @pezkuwi/dev ^0.85.12, @pezkuwi/x-bundle ^14.0.26.
- 3.17.3 for every package and for the dependencies between them.
2026-10-08 11:10:19 +04:00
..
2026-01-07 02:35:24 +03:00

@pezkuwi/ui-settings

Manages app settings including endpoints, themes and prefixes

Usage Examples

User preferences are set as a settings object in the browser's local storage.

import settings from '@pezkuwi/ui-settings';

render () {
  // get api endpoint for the selected chain
  const WS_URL = settings.apiUrl();

  // get the selected il8n language
  const language = settings.il8nLang();

  // get all available il8n languages
  const languages = settings.availableLanguages();

  // update settings
  const updatedSettings = {
    ...settings,
    i18nLang: 'Arabic'
  }
  settings.set(updatedSettings);

  // NOTE: API currently does not handle hot reconnecting properly,
  so you need to manually reload the page after updating settings.
  window.location.reload();
}

Used by

Apps that currently use the settings package