Skip to main content
  • Snap
  • Restricted

snap_getPreferences

Description

Gets the user's preferences.

Parameters

This method does not have any parameters.

Returns

object

An object containing the user's MetaMask preferences.

locale

string

The user's locale setting as a language code.

currency

string

The user's preferred fiat currency code (e.g., "usd", "eur").

hideBalances

boolean

Whether the user has chosen to hide balances in the MetaMask UI.

useSecurityAlerts

boolean

Whether to run transactions and signatures through security alert providers before submitting.

simulateOnChainActions

boolean

Whether to simulate transactions and signatures to preview their effects before the user confirms.

useTokenDetection

boolean

Whether to automatically detect and add ERC-20 tokens to the user's wallet.

batchCheckBalances

boolean

Whether to fetch token balances in an aggregated manner for improved performance.

displayNftMedia

boolean

Whether to display NFT media (images, videos) in the MetaMask UI.

useNftDetection

boolean

Whether to automatically detect and add NFTs to the user's wallet.

useExternalPricingData

boolean

Whether to fetch token price data from an external pricing source.

showTestnets

boolean

Whether to show testnet networks in the MetaMask UI.

On this page