diff --git a/.stylelintrc.json b/.stylelintrc.json index 3d4339d6d81..fd390fe9fe5 100644 --- a/.stylelintrc.json +++ b/.stylelintrc.json @@ -1,6 +1,9 @@ { "extends": "stylelint-config-standard", "rules": { - "selector-class-pattern": null + "selector-class-pattern": null, + "selector-pseudo-class-no-unknown": [true, { + "ignorePseudoClasses": ["global"] + }] } } \ No newline at end of file diff --git a/snaps/features/custom-name-resolution.md b/snaps/features/custom-name-resolution.md index 2b012b53c6e..a0016531cb8 100644 --- a/snaps/features/custom-name-resolution.md +++ b/snaps/features/custom-name-resolution.md @@ -45,7 +45,7 @@ The following example implements a very basic resolution from Unstoppable Domain Ethereum addresses in `onNameLookup`: ```typescript title="index.ts" -import type { OnNameLookupHandler } from "@metamask/snaps-types" +import type { OnNameLookupHandler } from "@metamask/snaps-sdk" const UNSTOPPABLE_API_KEY = "xxx" @@ -64,7 +64,7 @@ export const onNameLookup: OnNameLookupHandler = async (request) => { ) const data = await response.json() const resolvedAddress = data.records["crypto.ETH.address"] - if (address) { + if (resolvedAddress) { return { resolvedAddresses: [ { resolvedAddress, protocol: "Unstoppable Domains", domainName: domain }, @@ -78,9 +78,10 @@ export const onNameLookup: OnNameLookupHandler = async (request) => { ``` :::note -The response from the `onNameLookup` handler includes a `domainName` property. This can -be used to do fuzzy matching on domain names, by returning the domain that was resolved rather than -the one that was passed in. + +The `onNameLookup` handler response includes a `domainName` property. +You can use this property to perform fuzzy matching on domain names, by having the handler return the resolved domain rather than the one provided in the request. + ::: ## Example diff --git a/src/theme/DocSidebarItem/index.module.css b/src/theme/DocSidebarItem/index.module.css index 5e8d3aace5f..9e327512dda 100644 --- a/src/theme/DocSidebarItem/index.module.css +++ b/src/theme/DocSidebarItem/index.module.css @@ -1,5 +1,5 @@ -.flaskOnly > a.menu__link::after, -.flaskOnly > .menu__list-item-collapsible > a.menu__link::after { +.flaskOnly :global(a.menu__link::after), +.flaskOnly :global(.menu__list-item-collapsible a.menu__link::after) { content: "Flask"; margin-left: 0.5em; background-color: var(--mm-flask-background-color); diff --git a/wallet/connect/wallet-api.md b/wallet/connect/wallet-api.md index d7f0174f284..f28fe8a5158 100644 --- a/wallet/connect/wallet-api.md +++ b/wallet/connect/wallet-api.md @@ -445,7 +445,7 @@ You can clone the repository and run the example locally using `npm i && npm run After connecting to MetaMask directly, you can: -- [Detect, add, and switch networks](../how-to/manage-networks). +- [Detect, add, and switch networks](/wallet/how-to/manage-networks). - [Send transactions](../how-to/send-transactions.md). - [Sign data](../how-to/sign-data/index.md). -- [Display tokens, contract methods, and icons in MetaMask](../how-to/display). +- [Display tokens, contract methods, and icons in MetaMask](/wallet/how-to/display).