Repository navigation
docs(wallets): prefer enumerating window.midnight over hardcoding mnLace - #1407
Conversation
Clarify the community wallet SDK pages: the Edda starter React snippet should discover a wallet key from window.midnight, and the Lace overview should not imply a single hardcoded injection key.
|
@Kshot3000 is attempting to deploy a commit to the Midnight Foundation Team on Vercel. A member of the Team first needs to authorize it. |
oduameh
left a comment
There was a problem hiding this comment.
Thanks for picking this up! Moving readers off a hardcoded mnLace is the right call. The catch is that current Lace doesn't set mnLace at all: it installs under a fresh UUID key on every page load (its rdns is io.lace.wallet), while 1AM still uses 1am. So the new snippet ends up passing Lace's UUID to connectWallet, and because the widget saves that value for auto-reconnect, reconnecting breaks after a reload. My suggestions connect by rdns instead, drop the em-dash, and link the React guide rather than #1406, since reader docs shouldn't point at an open PR. That also means this can land on its own. A few unchanged lines still describe mnLace as current (integration.mdx lines 37 and 87, reference.mdx lines 61 and 160). Would you like to fix those here, or shall we pick them up in a follow-up?
oduameh
left a comment
There was a problem hiding this comment.
Thanks for turning these around so quickly. All three suggestions landed cleanly, so I'm happy to approve. I rechecked the snippet against the starter template's useWallet hook and dapp-connector-api 4.0.1 (it type-checks), and the Lace and 1AM details still hold on the builds in the Chrome store today (2.4.2 and 6.3.16). The few lines that still describe mnLace as current (integration.mdx 37 and 87, reference.mdx 61 and 160) sit outside this diff, so I'll pick those up in a follow-up rather than hold this one. I'll get CI running and bring the branch up to date with main from my side, so there's nothing more you need to do here.
Summary
Follow-up to #1406 for the community wallet SDK pages that still nudge readers toward a hardcoded
mnLacekey.Changes
sdks/community/wallets/integration.mdx: React starter snippet discovers a wallet key fromwindow.midnightinstead ofconnectWallet("mnLace", ...)sdks/community/wallets/wallets-overview.mdx: Lace bullet notes historical friendly key and points at enumeration /rdnsmatchingDoes not rewrite the factual note that some wallets still inject under friendly keys today.