From 1049b2958ed9740457aec0cdb558ede8fdb74ade Mon Sep 17 00:00:00 2001 From: Alexandra Carrillo <12214231+alexandratran@users.noreply.github.com> Date: Mon, 21 Oct 2024 10:31:15 -0700 Subject: [PATCH 1/3] Fix Flask label rendering (#1644) * Fix Flask label rendering * use css modules setup * update stylelint --- .stylelintrc.json | 5 ++++- src/theme/DocSidebarItem/index.module.css | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) 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/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); From bea6179976ff633af389ab437d85424e45608491 Mon Sep 17 00:00:00 2001 From: Alexandra Carrillo <12214231+alexandratran@users.noreply.github.com> Date: Mon, 21 Oct 2024 10:35:09 -0700 Subject: [PATCH 2/3] Fix broken wallet links (#1648) Co-authored-by: Joan E <153745173+joaniefromtheblock@users.noreply.github.com> --- wallet/connect/wallet-api.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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). From 0fb5f677d01bf1710631559a63f1ce187f51c2cf Mon Sep 17 00:00:00 2001 From: Joan E <153745173+joaniefromtheblock@users.noreply.github.com> Date: Mon, 21 Oct 2024 14:39:44 -0400 Subject: [PATCH 3/3] Fix typo in code segment of custom name resolution (#1650) * Fix for onNameLookup * Update snaps/features/custom-name-resolution.md Co-authored-by: Alexandra Carrillo <12214231+alexandratran@users.noreply.github.com> --------- Co-authored-by: Alexandra Carrillo <12214231+alexandratran@users.noreply.github.com> --- snaps/features/custom-name-resolution.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) 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