mirror of
https://gitlab.com/soapbox-pub/mkstack.git
synced 2026-12-03 08:07:21 +00:00
address npm test errors and warnings
This commit is contained in:
1 parent
8cf5391817
commit
f168b17495
10 files changed
+126
-125
No files matched your search
Generated
+26
-60
@@ -57,8 +57,8 @@
|
||||
"date-fns": "^3.6.0",
|
||||
"ecpair": "^3.0.0",
|
||||
"embla-carousel-react": "^8.3.0",
|
||||
"idb": "^8.0.3",
|
||||
"html5-qrcode": "^2.3.8",
|
||||
"idb": "^8.0.3",
|
||||
"input-otp": "^1.2.4",
|
||||
"lucide-react": "^0.462.0",
|
||||
"nostr-tools": "^2.13.0",
|
||||
@@ -341,6 +341,7 @@
|
||||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
},
|
||||
@@ -364,6 +365,7 @@
|
||||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
}
|
||||
@@ -1337,35 +1339,6 @@
|
||||
"@jridgewell/sourcemap-codec": "^1.4.14"
|
||||
}
|
||||
},
|
||||
"node_modules/@jsr/nostrify__nostrify": {
|
||||
"version": "0.46.5",
|
||||
"resolved": "https://npm.jsr.io/~/11/@jsr/nostrify__nostrify/0.46.5.tgz",
|
||||
"integrity": "sha512-l81N0o1A4WKAnOhq600ASDLxZbwzFZzUjhAkARPNFbWkXmEssVvXEQXyyoy1s7lboK45iZCijW0Bia7NHXmSug==",
|
||||
"dependencies": {
|
||||
"@jsr/nostrify__types": "^0.36.0",
|
||||
"@jsr/scure__base": "^1.2.4",
|
||||
"@jsr/std__encoding": "^0.224.1",
|
||||
"lru-cache": "^10.2.0",
|
||||
"nostr-tools": "^2.13.0",
|
||||
"websocket-ts": "^2.2.1",
|
||||
"zod": "^3.23.8"
|
||||
}
|
||||
},
|
||||
"node_modules/@jsr/nostrify__types": {
|
||||
"version": "0.36.0",
|
||||
"resolved": "https://npm.jsr.io/~/11/@jsr/nostrify__types/0.36.0.tgz",
|
||||
"integrity": "sha512-kDjFf1nJMhZafULtH2GW+TWjs85J0aDxYYLpwBDQugDVsFqG2kLbxnoE2NtMJCIMNk1vUaipUHeil//4fY/d2w=="
|
||||
},
|
||||
"node_modules/@jsr/scure__base": {
|
||||
"version": "1.2.6",
|
||||
"resolved": "https://npm.jsr.io/~/11/@jsr/scure__base/1.2.6.tgz",
|
||||
"integrity": "sha512-oZvJweJ4VMgVHJdsp8wwcG7t1U8aZLe0h8f4oNSFfavGqOKhpmi0b9mZ8vXLtGzBGiqVjK8Mon1NVMzTJincLQ=="
|
||||
},
|
||||
"node_modules/@jsr/std__encoding": {
|
||||
"version": "0.224.3",
|
||||
"resolved": "https://npm.jsr.io/~/11/@jsr/std__encoding/0.224.3.tgz",
|
||||
"integrity": "sha512-zAuX2QV1zwJ5RSmrnDGVerAtN3pBXpYYNlGzhERW9AiQ1UJd2/xruyB3i5NdTWy2OK2pjETswOj+0+prYTPlxQ=="
|
||||
},
|
||||
"node_modules/@noble/ciphers": {
|
||||
"version": "0.5.3",
|
||||
"resolved": "https://registry.npmjs.org/@noble/ciphers/-/ciphers-0.5.3.tgz",
|
||||
@@ -3763,7 +3736,6 @@
|
||||
"resolved": "https://registry.npmjs.org/@types/randombytes/-/randombytes-2.0.3.tgz",
|
||||
"integrity": "sha512-+NRgihTfuURllWCiIAhm1wsJqzsocnqXM77V/CalsdJIYSRGEHMnritxh+6EsBklshC+clo1KgnN14qgSGeQdw==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@types/node": "*"
|
||||
}
|
||||
@@ -3774,6 +3746,7 @@
|
||||
"integrity": "sha512-RFA/bURkcKzx/X9oumPG9Vp3D3JUgus/d0b67KB0t5S/raciymilkOa66olh78MUI92QLbEJevO7rvqU/kjwKA==",
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@types/prop-types": "*",
|
||||
"csstype": "^3.0.2"
|
||||
@@ -3785,6 +3758,7 @@
|
||||
"integrity": "sha512-MEe3UeoENYVFXzoXEWsvcpg6ZvlrFNlOQ7EOsvhI3CfAXwzPfO8Qwuxd40nepsYKqyyVQnTdEfv68q91yLcKrQ==",
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"peerDependencies": {
|
||||
"@types/react": "^18.0.0"
|
||||
}
|
||||
@@ -3835,6 +3809,7 @@
|
||||
"integrity": "sha512-BnOroVl1SgrPLywqxyqdJ4l3S2MsKVLDVxZvjI1Eoe8ev2r3kGDo+PcMihNmDE+6/KjkTubSJnmqGZZjQSBq/g==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/scope-manager": "8.46.2",
|
||||
"@typescript-eslint/types": "8.46.2",
|
||||
@@ -4237,6 +4212,7 @@
|
||||
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz",
|
||||
"integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"bin": {
|
||||
"acorn": "bin/acorn"
|
||||
},
|
||||
@@ -4531,7 +4507,6 @@
|
||||
"resolved": "https://registry.npmjs.org/bip174-liquid/-/bip174-liquid-1.0.3.tgz",
|
||||
"integrity": "sha512-e69sC0Cq2tBJuhG2+wieXv40DN13YBR/wbIjZp4Mqwpar5vQm8Ldqijdd6N33XG7LtfvQi/zKm5fSzdPY/9mgw==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=8.0.0"
|
||||
}
|
||||
@@ -4636,7 +4611,6 @@
|
||||
"resolved": "https://registry.npmjs.org/bitset/-/bitset-5.2.3.tgz",
|
||||
"integrity": "sha512-uZ7++Z60MC9cZ+7YzQ1v9yPDydcjhmcMjGx2yoGTjjSXBoVMmTr2LCRbkpI19S9P/C75hhP7Bsakj+gVzVUDbQ==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": "*"
|
||||
},
|
||||
@@ -4650,7 +4624,6 @@
|
||||
"resolved": "https://registry.npmjs.org/blech32/-/blech32-1.1.2.tgz",
|
||||
"integrity": "sha512-C5qxzoF9KyX88X8Zz18cZ6BOeL0n5/Eg/cDot1frntkArRMwg1djNim5wA6QFWwu0lJ1LN8iiRMN4Lp2kZzdfA==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"long": "^4.0.0"
|
||||
},
|
||||
@@ -4662,8 +4635,7 @@
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz",
|
||||
"integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==",
|
||||
"license": "Apache-2.0",
|
||||
"peer": true
|
||||
"license": "Apache-2.0"
|
||||
},
|
||||
"node_modules/bn.js": {
|
||||
"version": "5.2.2",
|
||||
@@ -4798,6 +4770,7 @@
|
||||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"baseline-browser-mapping": "^2.8.9",
|
||||
"caniuse-lite": "^1.0.30001746",
|
||||
@@ -5162,6 +5135,7 @@
|
||||
"version": "1.0.0-rc.17",
|
||||
"resolved": "https://registry.npmjs.org/coco-cashu-core/-/coco-cashu-core-1.0.0-rc.17.tgz",
|
||||
"integrity": "sha512-+G3ip1z5PkejhARW4F0djELPNYeUFTKP3shMcCNDLmkK1W3IcGvVlzVf60mbUaM4jl5IidbP9IZkcx7/aaJPYQ==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@cashu/cashu-ts": "^2.7.2"
|
||||
},
|
||||
@@ -5245,7 +5219,6 @@
|
||||
"resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz",
|
||||
"integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"cipher-base": "^1.0.3",
|
||||
"create-hash": "^1.1.0",
|
||||
@@ -5448,6 +5421,7 @@
|
||||
"resolved": "https://registry.npmjs.org/date-fns/-/date-fns-3.6.0.tgz",
|
||||
"integrity": "sha512-fRHTG8g/Gif+kSh50gaGEdToemgfj74aRX3swtiouboip5JDLAyDE9F11nHMIcvOaXeOC6D7SpNhi7uFyB7Uww==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"funding": {
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/kossnocorp"
|
||||
@@ -5652,7 +5626,8 @@
|
||||
"version": "8.6.0",
|
||||
"resolved": "https://registry.npmjs.org/embla-carousel/-/embla-carousel-8.6.0.tgz",
|
||||
"integrity": "sha512-SjWyZBHJPbqxHOzckOfo8lHisEaJWmwd23XppYFYVh10bU66/Pn5tkVkbkCMZVdbUE5eTCI2nD8OyIP4Z+uwkA==",
|
||||
"license": "MIT"
|
||||
"license": "MIT",
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/embla-carousel-react": {
|
||||
"version": "8.6.0",
|
||||
@@ -5810,6 +5785,7 @@
|
||||
"integrity": "sha512-t5aPOpmtJcZcz5UJyY2GbvpDlsK5E8JqRqoKtfiKE3cNh437KIqfJr3A3AKf5k64NPx6d0G3dno6XDY05PqPtw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@eslint-community/eslint-utils": "^4.8.0",
|
||||
"@eslint-community/regexpp": "^4.12.1",
|
||||
@@ -6786,6 +6762,7 @@
|
||||
"resolved": "https://registry.npmjs.org/jiti/-/jiti-1.21.7.tgz",
|
||||
"integrity": "sha512-/imKNG4EbWNrVjoNC/1H5/9GFy+tqjGBHCaSsN+P2RnPqjsLmv6UD3Ej+Kj8nBWaRAwyk7kK5ZUc+OEatnTR3A==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"bin": {
|
||||
"jiti": "bin/jiti.js"
|
||||
}
|
||||
@@ -6815,6 +6792,7 @@
|
||||
"integrity": "sha512-Cvc9WUhxSMEo4McES3P7oK3QaXldCfNWp7pl2NNeiIFlCoLr3kfq9kb1fxftiwk1FLV7CvpvDfonxtzUDeSOPg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"cssstyle": "^4.2.1",
|
||||
"data-urls": "^5.0.0",
|
||||
@@ -6929,7 +6907,6 @@
|
||||
"resolved": "https://registry.npmjs.org/liquidjs-lib/-/liquidjs-lib-6.0.2-liquid.37.tgz",
|
||||
"integrity": "sha512-AOPwqg9wtLMNxfqOf8afC+bYYrs3VBsTq/Mq/iOe0F2X3CcbgiLeSAcvOY34jbnUre6U+zmuXKP9bWmxnOG08A==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@types/randombytes": "^2.0.0",
|
||||
"bech32": "^2.0.0",
|
||||
@@ -6954,7 +6931,6 @@
|
||||
"resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.11.tgz",
|
||||
"integrity": "sha512-xz7wQ8xDhdyP7tQxwdteLYeFfS68tSMNCZ/Y37WJ4bhGfKPpqEIlmIyueQHqOyoPhE6xNUqjzRr8ra0eF9VRvA==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"safe-buffer": "^5.0.1"
|
||||
}
|
||||
@@ -6964,7 +6940,6 @@
|
||||
"resolved": "https://registry.npmjs.org/bip174/-/bip174-2.1.1.tgz",
|
||||
"integrity": "sha512-mdFV5+/v0XyNYXjBS6CQPLo9ekCx4gtKZFnJm5PMto7Fs9hTTDpkkzOB7/FtluRI6JbUUAu+snTYfJRgHLZbZQ==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=8.0.0"
|
||||
}
|
||||
@@ -6974,7 +6949,6 @@
|
||||
"resolved": "https://registry.npmjs.org/bip66/-/bip66-1.1.5.tgz",
|
||||
"integrity": "sha512-nemMHz95EmS38a26XbbdxIYj5csHd3RMP3H5bwQknX0WYHF01qhpufP42mLOwVICuH2JmhIhXiWs89MfUGL7Xw==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"safe-buffer": "^5.0.1"
|
||||
}
|
||||
@@ -6984,7 +6958,6 @@
|
||||
"resolved": "https://registry.npmjs.org/bitcoinjs-lib/-/bitcoinjs-lib-6.1.7.tgz",
|
||||
"integrity": "sha512-tlf/r2DGMbF7ky1MgUqXHzypYHakkEnm0SZP23CJKIqNY/5uNAnMbFhMJdhjrL/7anfb/U8+AlpdjPWjPnAalg==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@noble/hashes": "^1.2.0",
|
||||
"bech32": "^2.0.0",
|
||||
@@ -7001,15 +6974,13 @@
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmjs.org/base-x/-/base-x-4.0.1.tgz",
|
||||
"integrity": "sha512-uAZ8x6r6S3aUM9rbHGVOIsR15U/ZSc82b3ymnCPsT45Gk1DDvhDPdIgB5MrhirZWt+5K0EEPQH985kNqZgNPFw==",
|
||||
"license": "MIT",
|
||||
"peer": true
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/liquidjs-lib/node_modules/bitcoinjs-lib/node_modules/bs58": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/bs58/-/bs58-5.0.0.tgz",
|
||||
"integrity": "sha512-r+ihvQJvahgYT50JD05dyJNKlmmSlMoOGwn1lCcEzanPglg7TxYjioQUYehQ9mAR/+hOSd2jRc/Z2y5UxBymvQ==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"base-x": "^4.0.0"
|
||||
}
|
||||
@@ -7019,7 +6990,6 @@
|
||||
"resolved": "https://registry.npmjs.org/bs58check/-/bs58check-3.0.1.tgz",
|
||||
"integrity": "sha512-hjuuJvoWEybo7Hn/0xOrczQKKEKD63WguEjlhLExYs2wUBcebDC1jDNK17eEAD2lYfw82d5ASC1d7K3SWszjaQ==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@noble/hashes": "^1.2.0",
|
||||
"bs58": "^5.0.0"
|
||||
@@ -7030,7 +7000,6 @@
|
||||
"resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz",
|
||||
"integrity": "sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"base-x": "^3.0.2"
|
||||
}
|
||||
@@ -7040,7 +7009,6 @@
|
||||
"resolved": "https://registry.npmjs.org/bs58check/-/bs58check-2.1.2.tgz",
|
||||
"integrity": "sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"bs58": "^4.0.0",
|
||||
"create-hash": "^1.1.0",
|
||||
@@ -7052,7 +7020,6 @@
|
||||
"resolved": "https://registry.npmjs.org/ecpair/-/ecpair-2.1.0.tgz",
|
||||
"integrity": "sha512-cL/mh3MtJutFOvFc27GPZE2pWL3a3k4YvzUWEOvilnfZVlH3Jwgx/7d6tlD7/75tNk8TG2m+7Kgtz0SI1tWcqw==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"randombytes": "^2.1.0",
|
||||
"typeforce": "^1.18.0",
|
||||
@@ -7067,7 +7034,6 @@
|
||||
"resolved": "https://registry.npmjs.org/varuint-bitcoin/-/varuint-bitcoin-1.1.2.tgz",
|
||||
"integrity": "sha512-4EVb+w4rx+YfVM32HQX42AbbT7/1f5zwAYhIujKXKk8NQK+JfRVl3pqT3hjNn/L+RstigmGGKVwHA/P0wgITZw==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"safe-buffer": "^5.1.1"
|
||||
}
|
||||
@@ -7077,7 +7043,6 @@
|
||||
"resolved": "https://registry.npmjs.org/wif/-/wif-2.0.6.tgz",
|
||||
"integrity": "sha512-HIanZn1zmduSF+BQhkE+YXIbEiH0xPr1012QbFEGB0xsKqJii0/SqJjyn8dFv6y36kOznMgMB+LGcbZTJ1xACQ==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"bs58check": "<3.0.0"
|
||||
}
|
||||
@@ -7739,6 +7704,7 @@
|
||||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"nanoid": "^3.3.11",
|
||||
"picocolors": "^1.1.1",
|
||||
@@ -8020,7 +7986,6 @@
|
||||
"resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz",
|
||||
"integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"safe-buffer": "^5.1.0"
|
||||
}
|
||||
@@ -8030,6 +7995,7 @@
|
||||
"resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz",
|
||||
"integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"loose-envify": "^1.1.0"
|
||||
},
|
||||
@@ -8056,6 +8022,7 @@
|
||||
"resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz",
|
||||
"integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"loose-envify": "^1.1.0",
|
||||
"scheduler": "^0.23.2"
|
||||
@@ -8069,6 +8036,7 @@
|
||||
"resolved": "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.65.0.tgz",
|
||||
"integrity": "sha512-xtOzDz063WcXvGWaHgLNrNzlsdFgtUWcb32E6WFaGTd7kPZG3EeDusjdZfUsPwKCKVXy1ZlntifaHZ4l8pAsmw==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=18.0.0"
|
||||
},
|
||||
@@ -8417,6 +8385,7 @@
|
||||
"integrity": "sha512-3GuObel8h7Kqdjt0gxkEzaifHTqLVW56Y/bjN7PSQtkKr0w3V/QYSdt6QWYtd7A1xUtYQigtdUfgj1RvWVtorw==",
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@types/estree": "1.0.8"
|
||||
},
|
||||
@@ -8633,7 +8602,6 @@
|
||||
"resolved": "https://registry.npmjs.org/slip77/-/slip77-0.2.0.tgz",
|
||||
"integrity": "sha512-LQaxb1Hef10kU36qvk71tlSt5BWph7GM0j+t2n5zs169X4QfnNbb6xqKZ38X3ETzGmCQaVdBwr925HDagHra/Q==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@types/node": "^13.9.1",
|
||||
"create-hmac": "^1.1.7",
|
||||
@@ -8647,8 +8615,7 @@
|
||||
"version": "13.13.52",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-13.13.52.tgz",
|
||||
"integrity": "sha512-s3nugnZumCC//n4moGGe6tkNMyYEdaDBitVjwPxXmR5lnMG5dHePinH2EdxkG3Rh1ghFHHixAG4NJhpJW1rthQ==",
|
||||
"license": "MIT",
|
||||
"peer": true
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/source-map-js": {
|
||||
"version": "1.2.1",
|
||||
@@ -8899,6 +8866,7 @@
|
||||
"resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.18.tgz",
|
||||
"integrity": "sha512-6A2rnmW5xZMdw11LYjhcI5846rt9pbLSabY5XPxo+XWdxwZaFEn47Go4NzFiHu9sNNmr/kXivP1vStfvMaK1GQ==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@alloc/quick-lru": "^5.2.0",
|
||||
"arg": "^5.0.2",
|
||||
@@ -9182,6 +9150,7 @@
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz",
|
||||
"integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==",
|
||||
"license": "Apache-2.0",
|
||||
"peer": true,
|
||||
"bin": {
|
||||
"tsc": "bin/tsc",
|
||||
"tsserver": "bin/tsserver"
|
||||
@@ -9452,6 +9421,7 @@
|
||||
"integrity": "sha512-+Oxm7q9hDoLMyJOYfUYBuHQo+dkAloi33apOPP56pzj+vsdJDzr+j1NISE5pyaAuKL4A3UD34qd0lx5+kfKp2g==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"esbuild": "^0.25.0",
|
||||
"fdir": "^6.4.4",
|
||||
@@ -9858,10 +9828,6 @@
|
||||
"version": "8.18.3",
|
||||
"resolved": "https://registry.npmjs.org/ws/-/ws-8.18.3.tgz",
|
||||
"integrity": "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg==",
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
"dev": true,
|
||||
>>>>>>> main
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=10.0.0"
|
||||
|
||||
@@ -2,7 +2,7 @@ import { useState, useEffect, useRef } from 'react';
|
||||
import { nip19 } from 'nostr-tools';
|
||||
import { useBitcoinBalance, useBitcoinTransactionHistory, useBitcoinOperations } from '@/hooks/wallet/useBitcoin';
|
||||
import { useNsecAccess } from '@/hooks/useNsecAccess';
|
||||
import { nostrPubkeyToBitcoinAddress } from '@/lib/bitcoin';
|
||||
import { nostrPubkeyToBitcoinAddress, type UTXO } from '@/lib/bitcoin';
|
||||
import { QRModal } from '@/components/ui/qr-modal';
|
||||
import { TransactionCard } from './PaymentCard';
|
||||
import { ConsolidationModal } from './ConsolidationModal';
|
||||
@@ -14,20 +14,32 @@ import { ChevronUp, Send, Download, ScanLine } from 'lucide-react';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import type { QRScanResult } from '@/hooks/wallet/useQRCode';
|
||||
|
||||
interface BitcoinWalletHeaderProps {
|
||||
utxos: UTXO[];
|
||||
utxoDropdownOpen: boolean;
|
||||
setUtxoDropdownOpen: (open: boolean) => void;
|
||||
onShowConsolidationModal: () => void;
|
||||
isConsolidating: boolean;
|
||||
onShowBitcoinAddressQR: (qr: string) => void;
|
||||
}
|
||||
|
||||
interface BitcoinWalletProps {
|
||||
toast: ReturnType<typeof import('@/hooks/useToast').useToast>['toast'];
|
||||
generateQRCode: (text: string) => Promise<string>;
|
||||
copyToClipboard: (text: string) => Promise<void>;
|
||||
user?: { pubkey: string };
|
||||
onRequestQRScanner: () => void;
|
||||
onQRResult?: (result: QRScanResult) => void;
|
||||
onWalletHeaderPropsChange?: (props: any) => void;
|
||||
onWalletHeaderPropsChange?: (props: BitcoinWalletHeaderProps) => void;
|
||||
}
|
||||
|
||||
// Extend Window interface for QR handler
|
||||
declare global {
|
||||
interface Window {
|
||||
__bitcoinWalletQRHandler?: (result: QRScanResult) => void;
|
||||
}
|
||||
}
|
||||
|
||||
export function BitcoinWallet({
|
||||
toast,
|
||||
generateQRCode,
|
||||
copyToClipboard,
|
||||
user,
|
||||
onRequestQRScanner,
|
||||
onQRResult,
|
||||
@@ -35,7 +47,7 @@ export function BitcoinWallet({
|
||||
}: BitcoinWalletProps) {
|
||||
const { hasNsecAccess } = useNsecAccess();
|
||||
const bitcoinAddress = user?.pubkey ? nostrPubkeyToBitcoinAddress(user.pubkey) : null;
|
||||
const { data: bitcoinBalanceData, isLoading: isBitcoinBalanceLoading } = useBitcoinBalance(bitcoinAddress);
|
||||
const { isLoading: isBitcoinBalanceLoading } = useBitcoinBalance(bitcoinAddress);
|
||||
|
||||
const {
|
||||
utxos,
|
||||
@@ -124,7 +136,7 @@ export function BitcoinWallet({
|
||||
description: "Enter amount to send",
|
||||
});
|
||||
}
|
||||
} catch (err) {
|
||||
} catch {
|
||||
toast({
|
||||
variant: "destructive",
|
||||
title: "Invalid npub",
|
||||
@@ -135,14 +147,12 @@ export function BitcoinWallet({
|
||||
};
|
||||
|
||||
// Store handler for parent to call
|
||||
(window as any).__bitcoinWalletQRHandler = handleQRResult;
|
||||
window.__bitcoinWalletQRHandler = handleQRResult;
|
||||
return () => {
|
||||
delete (window as any).__bitcoinWalletQRHandler;
|
||||
delete window.__bitcoinWalletQRHandler;
|
||||
};
|
||||
}, [onQRResult, toast]);
|
||||
|
||||
const totalBalance = bitcoinBalanceData?.balance || 0;
|
||||
|
||||
// Expose WalletHeader props to parent WalletContainer
|
||||
// Use ref to track previous values and prevent infinite loops
|
||||
const prevPropsRef = useRef<{
|
||||
@@ -189,7 +199,7 @@ export function BitcoinWallet({
|
||||
});
|
||||
}, [
|
||||
onWalletHeaderPropsChange,
|
||||
utxos?.length,
|
||||
utxos,
|
||||
utxoDropdownOpen,
|
||||
isConsolidating,
|
||||
// Note: Functions (setUtxoDropdownOpen, etc.) are not in deps
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { useState, useEffect, useRef } from 'react';
|
||||
import { useState, useEffect, useRef, useCallback } from 'react';
|
||||
import { nip19 } from 'nostr-tools';
|
||||
import { useCashu } from '@/hooks/wallet/useCashu';
|
||||
import { useLightningAddress } from '@/hooks/wallet/useLightningAddress';
|
||||
@@ -24,21 +24,48 @@ import { ScrollArea } from '@/components/ui/scroll-area';
|
||||
import { ChevronUp, Send, Download, ScanLine } from 'lucide-react';
|
||||
import { Button } from '@/components/ui/button';
|
||||
|
||||
interface CashuMint {
|
||||
url: string;
|
||||
name?: string;
|
||||
}
|
||||
|
||||
interface CashuWalletHeaderProps {
|
||||
activeMintUrl: string | null;
|
||||
setActiveMintUrl: (url: string | null) => void;
|
||||
mints: CashuMint[];
|
||||
mintUrl: string;
|
||||
setMintUrl: (url: string) => void;
|
||||
onAddMint: () => void;
|
||||
onRemoveMint: (mint: CashuMint) => void;
|
||||
onShowDenominations: (mintUrl: string) => void;
|
||||
getCleanMintLabel: (mint: { name?: string; url: string }) => string;
|
||||
mintDropdownOpen: boolean;
|
||||
setMintDropdownOpen: (open: boolean) => void;
|
||||
npubCashUsername?: string;
|
||||
onShowLightningAddressQR: (qr: string) => void;
|
||||
onShowSeedPhraseInfo: () => void;
|
||||
}
|
||||
|
||||
interface CashuWalletProps {
|
||||
mode: 'tokens' | 'lightning';
|
||||
toast: ReturnType<typeof import('@/hooks/useToast').useToast>['toast'];
|
||||
generateQRCode: (text: string) => Promise<string>;
|
||||
copyToClipboard: (text: string) => Promise<void>;
|
||||
user?: { pubkey: string };
|
||||
onRequestQRScanner: () => void;
|
||||
onWalletHeaderPropsChange?: (props: any) => void;
|
||||
onWalletHeaderPropsChange?: (props: CashuWalletHeaderProps) => void;
|
||||
}
|
||||
|
||||
// Extend Window interface for QR handler
|
||||
declare global {
|
||||
interface Window {
|
||||
__cashuWalletQRHandler?: (result: QRScanResult) => void;
|
||||
}
|
||||
}
|
||||
|
||||
export function CashuWallet({
|
||||
mode,
|
||||
toast,
|
||||
generateQRCode,
|
||||
copyToClipboard,
|
||||
user,
|
||||
onRequestQRScanner,
|
||||
onWalletHeaderPropsChange,
|
||||
@@ -53,9 +80,7 @@ export function CashuWallet({
|
||||
isInitialized,
|
||||
isLoading,
|
||||
error,
|
||||
balances,
|
||||
mints,
|
||||
mnemonic,
|
||||
getEncodedToken,
|
||||
refreshMints,
|
||||
} = useCashu();
|
||||
@@ -118,9 +143,9 @@ export function CashuWallet({
|
||||
});
|
||||
|
||||
// Wrapper for setActiveMintUrl to handle the async nature
|
||||
const handleSetActiveMintSync = (url: string | null) => {
|
||||
const handleSetActiveMintSync = useCallback((url: string | null) => {
|
||||
setActiveMintUrl(url);
|
||||
};
|
||||
}, [setActiveMintUrl]);
|
||||
|
||||
// Transaction operation hooks
|
||||
const tokenOps = useTokenOperations({
|
||||
@@ -243,7 +268,7 @@ export function CashuWallet({
|
||||
// UI STATE
|
||||
// ============================================================================
|
||||
|
||||
const [showSats, setShowSats] = useState(true);
|
||||
const showSats = true; // Always show in sats for Cashu wallet
|
||||
const [showProofBreakdown, setShowProofBreakdown] = useState(false);
|
||||
const [proofBreakdown, setProofBreakdown] = useState<{
|
||||
mintUrl: string;
|
||||
@@ -285,12 +310,6 @@ export function CashuWallet({
|
||||
}
|
||||
};
|
||||
|
||||
// ============================================================================
|
||||
// COMPUTED VALUES
|
||||
// ============================================================================
|
||||
|
||||
const totalBalance: number = (Object.values(balances) as number[]).reduce((sum: number, balance: number) => sum + balance, 0);
|
||||
|
||||
// ============================================================================
|
||||
// EFFECTS - Error Handling
|
||||
// ============================================================================
|
||||
@@ -516,7 +535,7 @@ export function CashuWallet({
|
||||
}, [mintQuoteUnsubscribeRef]);
|
||||
|
||||
// Handle QR scan results (called from parent WalletContainer)
|
||||
const handleQRResult = (result: QRScanResult) => {
|
||||
const handleQRResult = useCallback((result: QRScanResult) => {
|
||||
switch (result.type) {
|
||||
case 'lightning_invoice': {
|
||||
setLightningInvoice(result.value);
|
||||
@@ -555,15 +574,15 @@ export function CashuWallet({
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
}, [setLightningInvoice, setPendingInvoice, setDecodedInvoiceAmount, setShowSendModal, setLightningAddressInput, setPendingLightningAddress, setTokenInput, setShowReceiveModal, toast]);
|
||||
|
||||
// Expose handler to parent via window (temporary, will be improved)
|
||||
useEffect(() => {
|
||||
(window as any).__cashuWalletQRHandler = handleQRResult;
|
||||
window.__cashuWalletQRHandler = handleQRResult;
|
||||
return () => {
|
||||
delete (window as any).__cashuWalletQRHandler;
|
||||
delete window.__cashuWalletQRHandler;
|
||||
};
|
||||
}, [mode, setLightningInvoice, setPendingInvoice, setDecodedInvoiceAmount, setShowSendModal, setLightningAddressInput, setPendingLightningAddress, setTokenInput, setShowReceiveModal, toast]); // Re-setup when mode changes
|
||||
}, [handleQRResult]);
|
||||
|
||||
// ============================================================================
|
||||
// RENDER
|
||||
@@ -580,6 +599,9 @@ export function CashuWallet({
|
||||
npubCashUsername?: string;
|
||||
}>({});
|
||||
|
||||
// Extract first mint URL to avoid complex expression in dependency array
|
||||
const firstMintUrl = mints?.[0]?.url;
|
||||
|
||||
useEffect(() => {
|
||||
if (!onWalletHeaderPropsChange) return;
|
||||
|
||||
@@ -589,7 +611,7 @@ export function CashuWallet({
|
||||
const currentProps = {
|
||||
activeMintUrl,
|
||||
mintsLength: mints?.length,
|
||||
firstMintUrl: mints?.[0]?.url,
|
||||
firstMintUrl,
|
||||
mintUrl,
|
||||
mintDropdownOpen,
|
||||
npubCashUsername,
|
||||
@@ -616,7 +638,7 @@ export function CashuWallet({
|
||||
onWalletHeaderPropsChange({
|
||||
activeMintUrl,
|
||||
setActiveMintUrl: handleSetActiveMintSync,
|
||||
mints,
|
||||
mints: mints || [],
|
||||
mintUrl,
|
||||
setMintUrl,
|
||||
onAddMint: handleAddMint,
|
||||
@@ -635,13 +657,25 @@ export function CashuWallet({
|
||||
}, [
|
||||
onWalletHeaderPropsChange,
|
||||
activeMintUrl,
|
||||
mints?.length,
|
||||
mints?.[0]?.url,
|
||||
mints,
|
||||
firstMintUrl,
|
||||
mintUrl,
|
||||
mintDropdownOpen,
|
||||
npubCashUserInfo?.name,
|
||||
user?.pubkey,
|
||||
// Note: Functions (handleSetActiveMintSync, handleAddMint, etc.) are not in deps
|
||||
handleSetActiveMintSync,
|
||||
handleAddMint,
|
||||
handleRemoveMintClick,
|
||||
handleShowDenominations,
|
||||
getCleanMintLabel,
|
||||
setMintDropdownOpen,
|
||||
setMintUrl,
|
||||
setShowProofBreakdown,
|
||||
setProofBreakdown,
|
||||
setLightningAddressQRCode,
|
||||
setShowLightningAddressQR,
|
||||
setShowSeedPhraseInfo,
|
||||
// Note: These functions are stable setters or wrapped in useCallback
|
||||
// because they're stable from hooks or we accept they may change
|
||||
// The ref-based change detection ensures we only update when primitives change
|
||||
]);
|
||||
|
||||
@@ -64,8 +64,7 @@ export function QRScanner({
|
||||
setModalOpen?.(false);
|
||||
stopScanning();
|
||||
}
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [isOpen, startScanning, stopScanning, setModalOpen]);
|
||||
}, [isOpen, startScanning, stopScanning, setModalOpen, onResult]);
|
||||
|
||||
return (
|
||||
<Dialog open={isOpen} onOpenChange={async (open) => {
|
||||
|
||||
@@ -1,17 +1,23 @@
|
||||
import { useState, useEffect, useRef, useCallback } from 'react';
|
||||
import { nip19 } from 'nostr-tools';
|
||||
import { useCurrentUser } from '@/hooks/useCurrentUser';
|
||||
import { useToast } from '@/hooks/useToast';
|
||||
import { useQRCode, type QRScanResult } from '@/hooks/wallet/useQRCode';
|
||||
import { useCopyToClipboard } from '@/hooks/useCopyToClipboard';
|
||||
import { useCashu } from '@/hooks/wallet/useCashu';
|
||||
import { useBitcoinBalance } from '@/hooks/wallet/useBitcoin';
|
||||
import { nostrPubkeyToBitcoinAddress } from '@/lib/bitcoin';
|
||||
import { nostrPubkeyToBitcoinAddress, type UTXO } from '@/lib/bitcoin';
|
||||
import { WalletHeader } from './WalletHeader';
|
||||
import { CashuWallet } from './CashuWallet';
|
||||
import { BitcoinWallet } from './BitcoinWallet';
|
||||
import { QRScanner } from './QRScanner';
|
||||
import { decodeBolt11Amount } from '@/lib/bolt11Decoder';
|
||||
|
||||
// Extend Window interface for QR handlers
|
||||
declare global {
|
||||
interface Window {
|
||||
__cashuWalletQRHandler?: (result: QRScanResult) => void;
|
||||
__bitcoinWalletQRHandler?: (result: QRScanResult) => void;
|
||||
}
|
||||
}
|
||||
|
||||
export function WalletContainer() {
|
||||
const [mode, setMode] = useState<'tokens' | 'lightning' | 'bitcoin'>('lightning');
|
||||
@@ -101,11 +107,11 @@ export function WalletContainer() {
|
||||
// Set up refs to wallet QR handlers
|
||||
useEffect(() => {
|
||||
const checkHandlers = () => {
|
||||
if ((window as any).__cashuWalletQRHandler) {
|
||||
cashuWalletQRHandlerRef.current = (window as any).__cashuWalletQRHandler;
|
||||
if (window.__cashuWalletQRHandler) {
|
||||
cashuWalletQRHandlerRef.current = window.__cashuWalletQRHandler;
|
||||
}
|
||||
if ((window as any).__bitcoinWalletQRHandler) {
|
||||
bitcoinWalletQRHandlerRef.current = (window as any).__bitcoinWalletQRHandler;
|
||||
if (window.__bitcoinWalletQRHandler) {
|
||||
bitcoinWalletQRHandlerRef.current = window.__bitcoinWalletQRHandler;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -129,7 +135,7 @@ export function WalletContainer() {
|
||||
mintDropdownOpen?: boolean;
|
||||
setMintDropdownOpen?: (open: boolean) => void;
|
||||
npubCashUsername?: string;
|
||||
utxos?: Array<any>;
|
||||
utxos?: UTXO[];
|
||||
utxoDropdownOpen?: boolean;
|
||||
setUtxoDropdownOpen?: (open: boolean) => void;
|
||||
onShowConsolidationModal?: () => void;
|
||||
@@ -190,7 +196,6 @@ export function WalletContainer() {
|
||||
mode={mode}
|
||||
toast={toast}
|
||||
generateQRCode={generateQRCode}
|
||||
copyToClipboard={copyToClipboard}
|
||||
user={user}
|
||||
onRequestQRScanner={() => setShowQRScanner(true)}
|
||||
onWalletHeaderPropsChange={handleWalletHeaderPropsChange}
|
||||
@@ -198,8 +203,6 @@ export function WalletContainer() {
|
||||
) : (
|
||||
<BitcoinWallet
|
||||
toast={toast}
|
||||
generateQRCode={generateQRCode}
|
||||
copyToClipboard={copyToClipboard}
|
||||
user={user}
|
||||
onRequestQRScanner={() => setShowQRScanner(true)}
|
||||
onQRResult={(result) => {
|
||||
|
||||
@@ -2,7 +2,7 @@ import { useQuery } from '@tanstack/react-query';
|
||||
import { useState, useCallback, useEffect } from 'react';
|
||||
import { fetchUTXOs, getFeeRates, createBitcoinTransaction, broadcastTransaction, calculateMaxSendAmount, npubToBitcoinAddress, nostrPubkeyToBitcoinAddress, type UTXO } from '@/lib/bitcoin';
|
||||
import type { BitcoinTransaction } from '@/components/wallet/TransactionHistory';
|
||||
import { useToast, toast } from '@/hooks/useToast';
|
||||
import { useToast } from '@/hooks/useToast';
|
||||
import { useQRCode } from '@/hooks/wallet/useQRCode';
|
||||
import { useNsecAccess } from '@/hooks/useNsecAccess';
|
||||
|
||||
|
||||
@@ -208,7 +208,6 @@ export function useNpubCash() {
|
||||
return acc;
|
||||
}, {} as Record<string, typeof quotes>);
|
||||
|
||||
let addedQuotes = 0;
|
||||
for (const [mintUrl, mintQuotes] of Object.entries(quotesByMint)) {
|
||||
try {
|
||||
// Check if mint exists (known) by checking all mints
|
||||
@@ -235,7 +234,6 @@ export function useNpubCash() {
|
||||
unit: "sat",
|
||||
})),
|
||||
);
|
||||
addedQuotes += mintQuotes.length;
|
||||
} catch (err) {
|
||||
console.warn(`Failed to sync quotes for mint ${mintUrl}:`, err);
|
||||
}
|
||||
|
||||
@@ -255,7 +255,7 @@ export function useQRCode(): UseQRCodeReturn {
|
||||
return {
|
||||
generateQRCode,
|
||||
isGenerating,
|
||||
error: scanError,
|
||||
error: error || scanError,
|
||||
isScanning,
|
||||
startScanning,
|
||||
stopScanning,
|
||||
|
||||
@@ -281,7 +281,7 @@ export async function createReverseSwap(
|
||||
}
|
||||
};
|
||||
|
||||
webSocket.onerror = (error) => {
|
||||
webSocket.onerror = () => {
|
||||
onError?.(new Error('WebSocket error occurred'));
|
||||
};
|
||||
|
||||
|
||||
@@ -10,15 +10,6 @@ if (!globalThis.Buffer) {
|
||||
globalThis.Buffer = Buffer.Buffer;
|
||||
}
|
||||
|
||||
/**
|
||||
* Polyfill for Buffer in browser environment
|
||||
*
|
||||
* Many Node.js libraries like bitcoinjs-lib expect Buffer to be globally available.
|
||||
* This polyfill makes the buffer package's Buffer available globally.
|
||||
*/
|
||||
import { Buffer } from 'buffer';
|
||||
globalThis.Buffer = Buffer;
|
||||
|
||||
/**
|
||||
* Polyfill for AbortSignal.any()
|
||||
*
|
||||
|
||||
Reference in new issue
Block a user