craft-nft

A standalone NFT implementation for real-world arts and crafts assets
Log | Files | Refs | README

commit 5290ab9b54942bf3fe7951dc8b49533d20d1b84a
parent 693183f98323b6397014c3c5a768c90dd34ec52a
Author: lash <dev@holbrook.no>
Date:   Sun, 19 Feb 2023 19:24:55 +0000

Add support for ethereum: prefix in qr address (metamask)

Diffstat:
Mjs/qrread.html | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/js/qrread.html b/js/qrread.html @@ -86,7 +86,10 @@ async function signAndSend(addr) { console.error('invalid ethereum address (too short)', addr); return; } - if (addr.substring(0, 2) == '0x') { + if (addr.substring(0, 9) == "ethereum:") { // metamask qr + addr = addr.substring(9); + } + if (addr.substring(0, 2) == "0x") { addr = addr.substring(2); } const re = new RegExp("^[0-9a-fA-F]{40}$");