mirror of
https://github.com/aljazceru/mutiny-web.git
synced 2026-02-07 23:34:27 +01:00
Merge pull request #13 from MutinyWallet/receive-screen-basics
Receive screen basics
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
"esbuild": "^0.14.54",
|
||||
"eslint": "^8.37.0",
|
||||
"postcss": "^8.4.21",
|
||||
"solid-start-node": "^0.2.24",
|
||||
"solid-start-node": "^0.2.26",
|
||||
"tailwindcss": "^3.3.1",
|
||||
"typescript": "^4.9.5",
|
||||
"vite": "^4.2.1",
|
||||
@@ -30,10 +30,11 @@
|
||||
"@solidjs/meta": "^0.28.4",
|
||||
"@solidjs/router": "^0.8.2",
|
||||
"class-variance-authority": "^0.4.0",
|
||||
"nostr-tools": "^1.8.1",
|
||||
"nostr-tools": "^1.8.2",
|
||||
"qr-scanner": "^1.4.2",
|
||||
"solid-js": "^1.7.1",
|
||||
"solid-start": "^0.2.24",
|
||||
"solid-js": "^1.7.2",
|
||||
"solid-qr-code": "^0.0.8",
|
||||
"solid-start": "^0.2.26",
|
||||
"undici": "^5.21.0"
|
||||
},
|
||||
"engines": {
|
||||
|
||||
244
pnpm-lock.yaml
generated
244
pnpm-lock.yaml
generated
@@ -3,7 +3,7 @@ lockfileVersion: '6.0'
|
||||
dependencies:
|
||||
'@motionone/solid':
|
||||
specifier: ^10.16.0
|
||||
version: 10.16.0(solid-js@1.7.1)
|
||||
version: 10.16.0(solid-js@1.7.2)
|
||||
'@mutinywallet/node-manager':
|
||||
specifier: ^0.2.2
|
||||
version: 0.2.2
|
||||
@@ -12,25 +12,28 @@ dependencies:
|
||||
version: 0.0.13(typescript@4.9.5)
|
||||
'@solidjs/meta':
|
||||
specifier: ^0.28.4
|
||||
version: 0.28.4(solid-js@1.7.1)
|
||||
version: 0.28.4(solid-js@1.7.2)
|
||||
'@solidjs/router':
|
||||
specifier: ^0.8.2
|
||||
version: 0.8.2(solid-js@1.7.1)
|
||||
version: 0.8.2(solid-js@1.7.2)
|
||||
class-variance-authority:
|
||||
specifier: ^0.4.0
|
||||
version: 0.4.0(typescript@4.9.5)
|
||||
nostr-tools:
|
||||
specifier: ^1.8.1
|
||||
version: 1.8.1
|
||||
specifier: ^1.8.2
|
||||
version: 1.8.2
|
||||
qr-scanner:
|
||||
specifier: ^1.4.2
|
||||
version: 1.4.2
|
||||
solid-js:
|
||||
specifier: ^1.7.1
|
||||
version: 1.7.1
|
||||
specifier: ^1.7.2
|
||||
version: 1.7.2
|
||||
solid-qr-code:
|
||||
specifier: ^0.0.8
|
||||
version: 0.0.8(qr.js@0.0.0)(solid-js@1.7.2)
|
||||
solid-start:
|
||||
specifier: ^0.2.24
|
||||
version: 0.2.24(@solidjs/meta@0.28.4)(@solidjs/router@0.8.2)(solid-js@1.7.1)(solid-start-node@0.2.24)(vite@4.2.1)
|
||||
specifier: ^0.2.26
|
||||
version: 0.2.26(@solidjs/meta@0.28.4)(@solidjs/router@0.8.2)(solid-js@1.7.2)(solid-start-node@0.2.26)(vite@4.2.1)
|
||||
undici:
|
||||
specifier: ^5.21.0
|
||||
version: 5.21.0
|
||||
@@ -58,8 +61,8 @@ devDependencies:
|
||||
specifier: ^8.4.21
|
||||
version: 8.4.21
|
||||
solid-start-node:
|
||||
specifier: ^0.2.24
|
||||
version: 0.2.24(solid-start@0.2.24)(undici@5.21.0)(vite@4.2.1)
|
||||
specifier: ^0.2.26
|
||||
version: 0.2.26(solid-start@0.2.26)(undici@5.21.0)(vite@4.2.1)
|
||||
tailwindcss:
|
||||
specifier: ^3.3.1
|
||||
version: 3.3.1(postcss@8.4.21)
|
||||
@@ -208,7 +211,7 @@ packages:
|
||||
'@babel/helper-plugin-utils': 7.20.2
|
||||
debug: 4.3.4
|
||||
lodash.debounce: 4.0.8
|
||||
resolve: 1.22.1
|
||||
resolve: 1.22.2
|
||||
semver: 6.3.0
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
@@ -1286,6 +1289,7 @@ packages:
|
||||
cpu: [loong64]
|
||||
os: [linux]
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/@esbuild/linux-loong64@0.17.15:
|
||||
@@ -1515,17 +1519,17 @@ packages:
|
||||
tslib: 2.5.0
|
||||
dev: false
|
||||
|
||||
/@motionone/solid@10.16.0(solid-js@1.7.1):
|
||||
/@motionone/solid@10.16.0(solid-js@1.7.2):
|
||||
resolution: {integrity: sha512-pxE5qQEtwv42bAllHFVapZevX5T4YTYzFe7vo0+Lljqyx+7+jP1NT0fosBUAOhDNdJNANNMldXwyh+qGBW5BrA==}
|
||||
peerDependencies:
|
||||
solid-js: ^1.5.0
|
||||
dependencies:
|
||||
'@motionone/dom': 10.15.5
|
||||
'@motionone/utils': 10.15.1
|
||||
'@solid-primitives/props': 3.1.4(solid-js@1.7.1)
|
||||
'@solid-primitives/refs': 1.0.2(solid-js@1.7.1)
|
||||
'@solid-primitives/transition-group': 1.0.1(solid-js@1.7.1)
|
||||
solid-js: 1.7.1
|
||||
'@solid-primitives/props': 3.1.4(solid-js@1.7.2)
|
||||
'@solid-primitives/refs': 1.0.2(solid-js@1.7.2)
|
||||
'@solid-primitives/transition-group': 1.0.1(solid-js@1.7.2)
|
||||
solid-js: 1.7.2
|
||||
dev: false
|
||||
|
||||
/@motionone/types@10.15.1:
|
||||
@@ -1593,7 +1597,7 @@ packages:
|
||||
eventemitter3: 5.0.0
|
||||
light-bolt11-decoder: 3.0.0
|
||||
node-fetch: 3.3.1
|
||||
nostr-tools: 1.8.1
|
||||
nostr-tools: 1.8.2
|
||||
utf8-buffer: 1.0.0
|
||||
websocket-polyfill: 0.0.3
|
||||
transitivePeerDependencies:
|
||||
@@ -1663,22 +1667,25 @@ packages:
|
||||
builtin-modules: 3.3.0
|
||||
deepmerge: 4.3.1
|
||||
is-module: 1.0.0
|
||||
resolve: 1.22.1
|
||||
resolve: 1.22.2
|
||||
rollup: 2.79.1
|
||||
dev: true
|
||||
|
||||
/@rollup/plugin-node-resolve@13.3.0(rollup@3.20.2):
|
||||
resolution: {integrity: sha512-Lus8rbUo1eEcnS4yTFKLZrVumLPY+YayBdWXgFSHYhTT2iJbMhoaaBL3xl5NCdeRytErGr8tZ0L71BMRmnlwSw==}
|
||||
engines: {node: '>= 10.0.0'}
|
||||
/@rollup/plugin-node-resolve@15.0.2(rollup@3.20.2):
|
||||
resolution: {integrity: sha512-Y35fRGUjC3FaurG722uhUuG8YHOJRJQbI6/CkbRkdPotSpDj9NtIN85z1zrcyDcCQIW4qp5mgG72U+gJ0TAFEg==}
|
||||
engines: {node: '>=14.0.0'}
|
||||
peerDependencies:
|
||||
rollup: ^2.42.0
|
||||
rollup: ^2.78.0||^3.0.0
|
||||
peerDependenciesMeta:
|
||||
rollup:
|
||||
optional: true
|
||||
dependencies:
|
||||
'@rollup/pluginutils': 3.1.0(rollup@3.20.2)
|
||||
'@types/resolve': 1.17.1
|
||||
'@rollup/pluginutils': 5.0.2(rollup@3.20.2)
|
||||
'@types/resolve': 1.20.2
|
||||
deepmerge: 4.3.1
|
||||
is-builtin-module: 3.2.1
|
||||
is-module: 1.0.0
|
||||
resolve: 1.22.1
|
||||
resolve: 1.22.2
|
||||
rollup: 3.20.2
|
||||
|
||||
/@rollup/plugin-replace@2.4.2(rollup@2.79.1):
|
||||
@@ -1717,17 +1724,6 @@ packages:
|
||||
rollup: 2.79.1
|
||||
dev: true
|
||||
|
||||
/@rollup/pluginutils@3.1.0(rollup@3.20.2):
|
||||
resolution: {integrity: sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==}
|
||||
engines: {node: '>= 8.0.0'}
|
||||
peerDependencies:
|
||||
rollup: ^1.20.0||^2.0.0
|
||||
dependencies:
|
||||
'@types/estree': 0.0.39
|
||||
estree-walker: 1.0.1
|
||||
picomatch: 2.3.1
|
||||
rollup: 3.20.2
|
||||
|
||||
/@rollup/pluginutils@5.0.2(rollup@3.20.2):
|
||||
resolution: {integrity: sha512-pTd9rIsP92h+B6wWwFbW8RkZv4hiR/xKsqre4SIuAOaOEQRxi0lqLke9k2/7WegC85GgUs9pjmOjCUi3In4vwA==}
|
||||
engines: {node: '>=14.0.0'}
|
||||
@@ -1772,53 +1768,53 @@ packages:
|
||||
/@sideway/pinpoint@2.0.0:
|
||||
resolution: {integrity: sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ==}
|
||||
|
||||
/@solid-primitives/props@3.1.4(solid-js@1.7.1):
|
||||
/@solid-primitives/props@3.1.4(solid-js@1.7.2):
|
||||
resolution: {integrity: sha512-RiwOZXbqb3RMmkznyfI63gwAB/iVHPk8AWN55oIEBRkjzgpuqRXIzdbsSQVy23jMbkRs91tRtzxQ/g6eoWLnuQ==}
|
||||
peerDependencies:
|
||||
solid-js: ^1.6.12
|
||||
dependencies:
|
||||
'@solid-primitives/utils': 6.0.0(solid-js@1.7.1)
|
||||
solid-js: 1.7.1
|
||||
'@solid-primitives/utils': 6.0.0(solid-js@1.7.2)
|
||||
solid-js: 1.7.2
|
||||
dev: false
|
||||
|
||||
/@solid-primitives/refs@1.0.2(solid-js@1.7.1):
|
||||
/@solid-primitives/refs@1.0.2(solid-js@1.7.2):
|
||||
resolution: {integrity: sha512-qnqQRdYbsENlVx86QCfftRKGZ/9zUJMGK9U85xDRymocEyeUXxdxgq0FeyGhvgg4A25spJVwHmuZUGY0aMBBLA==}
|
||||
peerDependencies:
|
||||
solid-js: ^1.6.12
|
||||
dependencies:
|
||||
'@solid-primitives/utils': 6.0.0(solid-js@1.7.1)
|
||||
solid-js: 1.7.1
|
||||
'@solid-primitives/utils': 6.0.0(solid-js@1.7.2)
|
||||
solid-js: 1.7.2
|
||||
dev: false
|
||||
|
||||
/@solid-primitives/transition-group@1.0.1(solid-js@1.7.1):
|
||||
/@solid-primitives/transition-group@1.0.1(solid-js@1.7.2):
|
||||
resolution: {integrity: sha512-StVQs7BVGQa1uo6dD19wqOgfGMxu3gL/bvPHUV/NBJaiNX5R5e7dPb6lz6zR1RdTho3M+3Mv8jUHKd/aKuhL4w==}
|
||||
peerDependencies:
|
||||
solid-js: ^1.6.12
|
||||
dependencies:
|
||||
solid-js: 1.7.1
|
||||
solid-js: 1.7.2
|
||||
dev: false
|
||||
|
||||
/@solid-primitives/utils@6.0.0(solid-js@1.7.1):
|
||||
/@solid-primitives/utils@6.0.0(solid-js@1.7.2):
|
||||
resolution: {integrity: sha512-SSu12+vvU6J8SVWW9eGV+dqiMsc0WG1Oy8YYY9AWzRzssmzNXg/uexaW+0eqTuj8JcRAaGplMDjhraB01HOidA==}
|
||||
peerDependencies:
|
||||
solid-js: ^1.6.12
|
||||
dependencies:
|
||||
solid-js: 1.7.1
|
||||
solid-js: 1.7.2
|
||||
dev: false
|
||||
|
||||
/@solidjs/meta@0.28.4(solid-js@1.7.1):
|
||||
/@solidjs/meta@0.28.4(solid-js@1.7.2):
|
||||
resolution: {integrity: sha512-1USElsQuGVcJnmZ6CxPfUVmKvCsVdBQoGrUyMxLtFw36Ytt90dPs/qLyXLvPR/ZPD16/qauWqg6APEkbrDOLcA==}
|
||||
peerDependencies:
|
||||
solid-js: '>=1.4.0'
|
||||
dependencies:
|
||||
solid-js: 1.7.1
|
||||
solid-js: 1.7.2
|
||||
|
||||
/@solidjs/router@0.8.2(solid-js@1.7.1):
|
||||
/@solidjs/router@0.8.2(solid-js@1.7.2):
|
||||
resolution: {integrity: sha512-gUKW+LZqxtX6y/Aw6JKyy4gQ9E7dLqp513oB9pSYJR1HM5c56Pf7eijzyXX+b3WuXig18Cxqah4tMtF0YGu80w==}
|
||||
peerDependencies:
|
||||
solid-js: ^1.5.3
|
||||
dependencies:
|
||||
solid-js: 1.7.1
|
||||
solid-js: 1.7.2
|
||||
|
||||
/@surma/rollup-plugin-off-main-thread@2.2.3:
|
||||
resolution: {integrity: sha512-lR8q/9W7hZpMWweNiAKU7NQerBnzQQLvi8qnTDU/fxItPhtZVMbPV3lbCwjhIlNBe9Bbr5V+KHshvWmVSG9cxQ==}
|
||||
@@ -1859,6 +1855,7 @@ packages:
|
||||
|
||||
/@types/estree@0.0.39:
|
||||
resolution: {integrity: sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==}
|
||||
dev: true
|
||||
|
||||
/@types/estree@1.0.0:
|
||||
resolution: {integrity: sha512-WulqXMDUTYAXCjZnk6JtIHPigp55cVtDgDrO2gHRwhyJto21+1zbVCtOYB2L1F9w4qCQ0rOGWBnBe0FNTiEJIQ==}
|
||||
@@ -1881,6 +1878,10 @@ packages:
|
||||
resolution: {integrity: sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==}
|
||||
dependencies:
|
||||
'@types/node': 18.15.11
|
||||
dev: true
|
||||
|
||||
/@types/resolve@1.20.2:
|
||||
resolution: {integrity: sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==}
|
||||
|
||||
/@types/semver@7.3.13:
|
||||
resolution: {integrity: sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw==}
|
||||
@@ -2139,7 +2140,7 @@ packages:
|
||||
postcss: ^8.1.0
|
||||
dependencies:
|
||||
browserslist: 4.21.5
|
||||
caniuse-lite: 1.0.30001473
|
||||
caniuse-lite: 1.0.30001474
|
||||
fraction.js: 4.2.0
|
||||
normalize-range: 0.1.2
|
||||
picocolors: 1.0.0
|
||||
@@ -2158,8 +2159,8 @@ packages:
|
||||
transitivePeerDependencies:
|
||||
- debug
|
||||
|
||||
/babel-plugin-jsx-dom-expressions@0.36.6(@babel/core@7.21.4):
|
||||
resolution: {integrity: sha512-O7R0wl6uROhswAcg12sq/HuMQZIhXgjSgkQB83lu5hQWxVMcxZSX0avYXR0PGZxcK6zX6ke7Du1d6rwy+BssWg==}
|
||||
/babel-plugin-jsx-dom-expressions@0.36.8(@babel/core@7.21.4):
|
||||
resolution: {integrity: sha512-hWG9WOa0gAxD1CKtzBxXMZoDMfn0Fxv8pYrl4y8znOpaS0vLuyNsclLH/w4hv+VBpv1yt9Rn4Gm/ImLBcqUfKA==}
|
||||
peerDependencies:
|
||||
'@babel/core': ^7.20.12
|
||||
dependencies:
|
||||
@@ -2203,13 +2204,13 @@ packages:
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
/babel-preset-solid@1.7.1(@babel/core@7.21.4):
|
||||
resolution: {integrity: sha512-a4TSLrEKIscsTIEBVo9fuWSdBQjEBrkQmNzIvXd26MO1Zyqdts+VEMy2k/OhfH0/L9ZY0ELLrTcij1IMDxVldQ==}
|
||||
/babel-preset-solid@1.7.2(@babel/core@7.21.4):
|
||||
resolution: {integrity: sha512-2SVcLTk6RXgXv3ebbm4iKiAPTPhQ/+3zd1KUOnMq/qBMr9ZshzdtIS4dMr9orWPHwDTdvJ2ZAadyGf3ZfTwWjg==}
|
||||
peerDependencies:
|
||||
'@babel/core': ^7.0.0
|
||||
dependencies:
|
||||
'@babel/core': 7.21.4
|
||||
babel-plugin-jsx-dom-expressions: 0.36.6(@babel/core@7.21.4)
|
||||
babel-plugin-jsx-dom-expressions: 0.36.8(@babel/core@7.21.4)
|
||||
|
||||
/balanced-match@1.0.2:
|
||||
resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==}
|
||||
@@ -2240,8 +2241,8 @@ packages:
|
||||
engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7}
|
||||
hasBin: true
|
||||
dependencies:
|
||||
caniuse-lite: 1.0.30001473
|
||||
electron-to-chromium: 1.4.349
|
||||
caniuse-lite: 1.0.30001474
|
||||
electron-to-chromium: 1.4.353
|
||||
node-releases: 2.0.10
|
||||
update-browserslist-db: 1.0.10(browserslist@4.21.5)
|
||||
|
||||
@@ -2285,8 +2286,8 @@ packages:
|
||||
engines: {node: '>= 6'}
|
||||
dev: true
|
||||
|
||||
/caniuse-lite@1.0.30001473:
|
||||
resolution: {integrity: sha512-ewDad7+D2vlyy+E4UJuVfiBsU69IL+8oVmTuZnH5Q6CIUbxNfI50uVpRHbUPDD6SUaN2o0Lh4DhTrvLG/Tn1yg==}
|
||||
/caniuse-lite@1.0.30001474:
|
||||
resolution: {integrity: sha512-iaIZ8gVrWfemh5DG3T9/YqarVZoYf0r188IjaGwx68j4Pf0SGY6CQkmJUIE+NZHkkecQGohzXmBGEwWDr9aM3Q==}
|
||||
|
||||
/chalk@2.4.2:
|
||||
resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==}
|
||||
@@ -2541,8 +2542,8 @@ packages:
|
||||
jake: 10.8.5
|
||||
dev: true
|
||||
|
||||
/electron-to-chromium@1.4.349:
|
||||
resolution: {integrity: sha512-34LBfVDiL6byWorSmQOPwq4gD5wpN8Mhh5yPGQr67FbcxsfUS0BDJP9y6RykSgeWVUfSkN/2dChywnsrmKVyUg==}
|
||||
/electron-to-chromium@1.4.353:
|
||||
resolution: {integrity: sha512-IdJVpMHJoBT/nn0GQ02wPfbhogDVpd1ud95lP//FTf5l35wzxKJwibB4HBdY7Q+xKPA1nkZ0UDLOMyRj5U5IAQ==}
|
||||
|
||||
/emoji-regex@8.0.0:
|
||||
resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==}
|
||||
@@ -2646,6 +2647,7 @@ packages:
|
||||
cpu: [x64]
|
||||
os: [android]
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/esbuild-android-arm64@0.14.54:
|
||||
@@ -2654,6 +2656,7 @@ packages:
|
||||
cpu: [arm64]
|
||||
os: [android]
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/esbuild-darwin-64@0.14.54:
|
||||
@@ -2662,6 +2665,7 @@ packages:
|
||||
cpu: [x64]
|
||||
os: [darwin]
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/esbuild-darwin-arm64@0.14.54:
|
||||
@@ -2670,6 +2674,7 @@ packages:
|
||||
cpu: [arm64]
|
||||
os: [darwin]
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/esbuild-freebsd-64@0.14.54:
|
||||
@@ -2678,6 +2683,7 @@ packages:
|
||||
cpu: [x64]
|
||||
os: [freebsd]
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/esbuild-freebsd-arm64@0.14.54:
|
||||
@@ -2686,6 +2692,7 @@ packages:
|
||||
cpu: [arm64]
|
||||
os: [freebsd]
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/esbuild-linux-32@0.14.54:
|
||||
@@ -2694,6 +2701,7 @@ packages:
|
||||
cpu: [ia32]
|
||||
os: [linux]
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/esbuild-linux-64@0.14.54:
|
||||
@@ -2702,6 +2710,7 @@ packages:
|
||||
cpu: [x64]
|
||||
os: [linux]
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/esbuild-linux-arm64@0.14.54:
|
||||
@@ -2710,6 +2719,7 @@ packages:
|
||||
cpu: [arm64]
|
||||
os: [linux]
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/esbuild-linux-arm@0.14.54:
|
||||
@@ -2718,6 +2728,7 @@ packages:
|
||||
cpu: [arm]
|
||||
os: [linux]
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/esbuild-linux-mips64le@0.14.54:
|
||||
@@ -2726,6 +2737,7 @@ packages:
|
||||
cpu: [mips64el]
|
||||
os: [linux]
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/esbuild-linux-ppc64le@0.14.54:
|
||||
@@ -2734,6 +2746,7 @@ packages:
|
||||
cpu: [ppc64]
|
||||
os: [linux]
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/esbuild-linux-riscv64@0.14.54:
|
||||
@@ -2742,6 +2755,7 @@ packages:
|
||||
cpu: [riscv64]
|
||||
os: [linux]
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/esbuild-linux-s390x@0.14.54:
|
||||
@@ -2750,6 +2764,7 @@ packages:
|
||||
cpu: [s390x]
|
||||
os: [linux]
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/esbuild-netbsd-64@0.14.54:
|
||||
@@ -2758,6 +2773,7 @@ packages:
|
||||
cpu: [x64]
|
||||
os: [netbsd]
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/esbuild-openbsd-64@0.14.54:
|
||||
@@ -2766,19 +2782,20 @@ packages:
|
||||
cpu: [x64]
|
||||
os: [openbsd]
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/esbuild-plugin-solid@0.4.2(esbuild@0.14.54)(solid-js@1.7.1):
|
||||
resolution: {integrity: sha512-T5GphLoud3RumjeNYO3K9WVjWDzVKG5evlS7hUEUI0n9tiCL+CnbvJh3SSwFi3xeeXpZRrnZc1gd6FWQsVobTg==}
|
||||
/esbuild-plugin-solid@0.5.0(esbuild@0.17.15)(solid-js@1.7.2):
|
||||
resolution: {integrity: sha512-ITK6n+0ayGFeDVUZWNMxX+vLsasEN1ILrg4pISsNOQ+mq4ljlJJiuXotInd+HE0MzwTcA9wExT1yzDE2hsqPsg==}
|
||||
peerDependencies:
|
||||
esbuild: '>=0.12'
|
||||
solid-js: '>= 1.0'
|
||||
dependencies:
|
||||
'@babel/core': 7.21.4
|
||||
'@babel/preset-typescript': 7.21.4(@babel/core@7.21.4)
|
||||
babel-preset-solid: 1.7.1(@babel/core@7.21.4)
|
||||
esbuild: 0.14.54
|
||||
solid-js: 1.7.1
|
||||
babel-preset-solid: 1.7.2(@babel/core@7.21.4)
|
||||
esbuild: 0.17.15
|
||||
solid-js: 1.7.2
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
@@ -2788,6 +2805,7 @@ packages:
|
||||
cpu: [x64]
|
||||
os: [sunos]
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/esbuild-windows-32@0.14.54:
|
||||
@@ -2796,6 +2814,7 @@ packages:
|
||||
cpu: [ia32]
|
||||
os: [win32]
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/esbuild-windows-64@0.14.54:
|
||||
@@ -2804,6 +2823,7 @@ packages:
|
||||
cpu: [x64]
|
||||
os: [win32]
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/esbuild-windows-arm64@0.14.54:
|
||||
@@ -2812,6 +2832,7 @@ packages:
|
||||
cpu: [arm64]
|
||||
os: [win32]
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/esbuild@0.14.54:
|
||||
@@ -2841,6 +2862,7 @@ packages:
|
||||
esbuild-windows-32: 0.14.54
|
||||
esbuild-windows-64: 0.14.54
|
||||
esbuild-windows-arm64: 0.14.54
|
||||
dev: true
|
||||
|
||||
/esbuild@0.17.15:
|
||||
resolution: {integrity: sha512-LBUV2VsUIc/iD9ME75qhT4aJj0r75abCVS0jakhFzOtR7TQsqQA5w0tZ+KTKnwl3kXE0MhskNdHDh/I5aCR1Zw==}
|
||||
@@ -2900,7 +2922,7 @@ packages:
|
||||
dependencies:
|
||||
debug: 3.2.7
|
||||
is-core-module: 2.11.0
|
||||
resolve: 1.22.1
|
||||
resolve: 1.22.2
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
dev: false
|
||||
@@ -2958,7 +2980,7 @@ packages:
|
||||
is-glob: 4.0.3
|
||||
minimatch: 3.1.2
|
||||
object.values: 1.1.6
|
||||
resolve: 1.22.1
|
||||
resolve: 1.22.2
|
||||
semver: 6.3.0
|
||||
tsconfig-paths: 3.14.2
|
||||
transitivePeerDependencies:
|
||||
@@ -3063,6 +3085,7 @@ packages:
|
||||
|
||||
/estree-walker@1.0.1:
|
||||
resolution: {integrity: sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==}
|
||||
dev: true
|
||||
|
||||
/estree-walker@2.0.2:
|
||||
resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==}
|
||||
@@ -3870,8 +3893,8 @@ packages:
|
||||
engines: {node: '>=0.10.0'}
|
||||
dev: true
|
||||
|
||||
/nostr-tools@1.8.1:
|
||||
resolution: {integrity: sha512-/2IUe5xINUYT5hYBoEz51dfRaodbRHnyF8n+ZbKWCoh0ZRX6AL88OoDNrWaWWo7tP5j5OyzSL9g/z4TP7bshEA==}
|
||||
/nostr-tools@1.8.2:
|
||||
resolution: {integrity: sha512-r9erqxO96E2BqvOvR/5W0usY7GlcO9fVLKc1Q8b/LCBgISVaMWD2VFmjdSUcHSGPMWHLvB6k4Jui+FTi5KAprw==}
|
||||
dependencies:
|
||||
'@noble/hashes': 1.0.0
|
||||
'@noble/secp256k1': 1.7.1
|
||||
@@ -4027,7 +4050,7 @@ packages:
|
||||
postcss: 8.4.21
|
||||
postcss-value-parser: 4.2.0
|
||||
read-cache: 1.0.0
|
||||
resolve: 1.22.1
|
||||
resolve: 1.22.2
|
||||
dev: true
|
||||
|
||||
/postcss-js@4.0.1(postcss@8.4.21):
|
||||
@@ -4117,6 +4140,10 @@ packages:
|
||||
'@types/offscreencanvas': 2019.7.0
|
||||
dev: false
|
||||
|
||||
/qr.js@0.0.0:
|
||||
resolution: {integrity: sha512-c4iYnWb+k2E+vYpRimHqSu575b1/wKl4XFeJGpFmrJQz5I88v9aY2czh7s0w36srfCM1sXgC/xpoJz5dJfq+OQ==}
|
||||
dev: false
|
||||
|
||||
/queue-microtask@1.2.3:
|
||||
resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==}
|
||||
|
||||
@@ -4202,8 +4229,8 @@ packages:
|
||||
resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==}
|
||||
engines: {node: '>=4'}
|
||||
|
||||
/resolve@1.22.1:
|
||||
resolution: {integrity: sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==}
|
||||
/resolve@1.22.2:
|
||||
resolution: {integrity: sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==}
|
||||
hasBin: true
|
||||
dependencies:
|
||||
is-core-module: 2.11.0
|
||||
@@ -4360,13 +4387,24 @@ packages:
|
||||
resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==}
|
||||
engines: {node: '>=8'}
|
||||
|
||||
/solid-js@1.7.1:
|
||||
resolution: {integrity: sha512-G7wPaRsxY+Mr6GTVSHIqrpHoJNM5YHX6V/X03mPo9RmsuVZU6ZA2O+jVJty6mOyGME24WR30E55L0IQsxxO/vg==}
|
||||
/solid-js@1.7.2:
|
||||
resolution: {integrity: sha512-01f8GIc+HTTlfDXtK+TFku3AllHyJ3hNsIpxM2qpObRP4VbEGVIP6VbULnThPlpse+J1y/I/1N9QeQ9MNkE8Ow==}
|
||||
dependencies:
|
||||
csstype: 3.1.2
|
||||
seroval: 0.5.1
|
||||
|
||||
/solid-refresh@0.5.2(solid-js@1.7.1):
|
||||
/solid-qr-code@0.0.8(qr.js@0.0.0)(solid-js@1.7.2):
|
||||
resolution: {integrity: sha512-K7LC3IKvyRag6WW7/ijJl32pBmoC3EzZ7AuydyaAVKSmlwukJmqvrFkrxaA1bOWabYJhzP9qwLbjDVlCUP2BwQ==}
|
||||
engines: {node: '>=10', yarn: '>=1.22.5'}
|
||||
peerDependencies:
|
||||
qr.js: ^0.0.0
|
||||
solid-js: ^1.4.8
|
||||
dependencies:
|
||||
qr.js: 0.0.0
|
||||
solid-js: 1.7.2
|
||||
dev: false
|
||||
|
||||
/solid-refresh@0.5.2(solid-js@1.7.2):
|
||||
resolution: {integrity: sha512-I69HmFj0LsGRJ3n8CEMVjyQFgVtuM2bSjznu2hCnsY+i5oOxh8ioWj00nnHBv0UYD3WpE/Sq4Q3TNw2IKmKN7A==}
|
||||
peerDependencies:
|
||||
solid-js: ^1.3
|
||||
@@ -4374,10 +4412,10 @@ packages:
|
||||
'@babel/generator': 7.21.4
|
||||
'@babel/helper-module-imports': 7.21.4
|
||||
'@babel/types': 7.21.4
|
||||
solid-js: 1.7.1
|
||||
solid-js: 1.7.2
|
||||
|
||||
/solid-start-node@0.2.24(solid-start@0.2.24)(undici@5.21.0)(vite@4.2.1):
|
||||
resolution: {integrity: sha512-7IqgPbuOLNlSEsbuvx3/4Zeihk2oqHR3qNMAhaKeSwqksrmtXyrzM694f3Y26IqqVcQQhLBbQjM45NwPWK4iAw==}
|
||||
/solid-start-node@0.2.26(solid-start@0.2.26)(undici@5.21.0)(vite@4.2.1):
|
||||
resolution: {integrity: sha512-8vciTGoQV+lIlCUSVHJPazlaoKDRfBowDkPeBr/EZdmtbcMOKoJYf/APPQWFspylF+nhzunMf0+zJP90VtMEYg==}
|
||||
peerDependencies:
|
||||
solid-start: '*'
|
||||
undici: ^5.8.0
|
||||
@@ -4385,20 +4423,20 @@ packages:
|
||||
dependencies:
|
||||
'@rollup/plugin-commonjs': 24.0.1(rollup@3.20.2)
|
||||
'@rollup/plugin-json': 6.0.0(rollup@3.20.2)
|
||||
'@rollup/plugin-node-resolve': 13.3.0(rollup@3.20.2)
|
||||
'@rollup/plugin-node-resolve': 15.0.2(rollup@3.20.2)
|
||||
compression: 1.7.4
|
||||
polka: 1.0.0-next.22
|
||||
rollup: 3.20.2
|
||||
sirv: 2.0.2
|
||||
solid-start: 0.2.24(@solidjs/meta@0.28.4)(@solidjs/router@0.8.2)(solid-js@1.7.1)(solid-start-node@0.2.24)(vite@4.2.1)
|
||||
solid-start: 0.2.26(@solidjs/meta@0.28.4)(@solidjs/router@0.8.2)(solid-js@1.7.2)(solid-start-node@0.2.26)(vite@4.2.1)
|
||||
terser: 5.16.8
|
||||
undici: 5.21.0
|
||||
vite: 4.2.1(@types/node@18.15.11)
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
/solid-start@0.2.24(@solidjs/meta@0.28.4)(@solidjs/router@0.8.2)(solid-js@1.7.1)(solid-start-node@0.2.24)(vite@4.2.1):
|
||||
resolution: {integrity: sha512-7nbl4mRiWwts7KN4ep1vT4eRcjacB6StdP/JalaCWtovpX0EctcEwXpJQeHKkGCL+J0n3M+aph0qkzUyJ5tD6Q==}
|
||||
/solid-start@0.2.26(@solidjs/meta@0.28.4)(@solidjs/router@0.8.2)(solid-js@1.7.2)(solid-start-node@0.2.26)(vite@4.2.1):
|
||||
resolution: {integrity: sha512-kne2HZlnSMzsirdnvNs1CsDqBl0L0uvKKt1t4de1CH7JIngyqoMcER97jTE0Ejr84KknANaKAdvJAzZcL7Ueng==}
|
||||
hasBin: true
|
||||
peerDependencies:
|
||||
'@solidjs/meta': ^0.28.0
|
||||
@@ -4437,8 +4475,8 @@ packages:
|
||||
'@babel/preset-env': 7.21.4(@babel/core@7.21.4)
|
||||
'@babel/preset-typescript': 7.21.4(@babel/core@7.21.4)
|
||||
'@babel/template': 7.20.7
|
||||
'@solidjs/meta': 0.28.4(solid-js@1.7.1)
|
||||
'@solidjs/router': 0.8.2(solid-js@1.7.1)
|
||||
'@solidjs/meta': 0.28.4(solid-js@1.7.2)
|
||||
'@solidjs/router': 0.8.2(solid-js@1.7.2)
|
||||
'@types/cookie': 0.5.1
|
||||
chokidar: 3.5.3
|
||||
compression: 1.7.4
|
||||
@@ -4447,8 +4485,8 @@ packages:
|
||||
dequal: 2.0.3
|
||||
dotenv: 16.0.3
|
||||
es-module-lexer: 1.2.1
|
||||
esbuild: 0.14.54
|
||||
esbuild-plugin-solid: 0.4.2(esbuild@0.14.54)(solid-js@1.7.1)
|
||||
esbuild: 0.17.15
|
||||
esbuild-plugin-solid: 0.5.0(esbuild@0.17.15)(solid-js@1.7.2)
|
||||
fast-glob: 3.2.12
|
||||
get-port: 6.1.2
|
||||
parse-multipart-data: 1.5.0
|
||||
@@ -4459,13 +4497,13 @@ packages:
|
||||
sade: 1.8.1
|
||||
set-cookie-parser: 2.6.0
|
||||
sirv: 2.0.2
|
||||
solid-js: 1.7.1
|
||||
solid-start-node: 0.2.24(solid-start@0.2.24)(undici@5.21.0)(vite@4.2.1)
|
||||
solid-js: 1.7.2
|
||||
solid-start-node: 0.2.26(solid-start@0.2.26)(undici@5.21.0)(vite@4.2.1)
|
||||
terser: 5.16.8
|
||||
undici: 5.21.0
|
||||
vite: 4.2.1(@types/node@18.15.11)
|
||||
vite-plugin-inspect: 0.7.18(rollup@3.20.2)(vite@4.2.1)
|
||||
vite-plugin-solid: 2.6.1(solid-js@1.7.1)(vite@4.2.1)
|
||||
vite-plugin-inspect: 0.7.19(rollup@3.20.2)(vite@4.2.1)
|
||||
vite-plugin-solid: 2.7.0(solid-js@1.7.2)(vite@4.2.1)
|
||||
wait-on: 6.0.1(debug@4.3.4)
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
@@ -4638,7 +4676,7 @@ packages:
|
||||
postcss-selector-parser: 6.0.11
|
||||
postcss-value-parser: 4.2.0
|
||||
quick-lru: 5.1.1
|
||||
resolve: 1.22.1
|
||||
resolve: 1.22.2
|
||||
sucrase: 3.31.0
|
||||
transitivePeerDependencies:
|
||||
- ts-node
|
||||
@@ -4883,8 +4921,8 @@ packages:
|
||||
resolution: {integrity: sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==}
|
||||
engines: {node: '>= 0.8'}
|
||||
|
||||
/vite-plugin-inspect@0.7.18(rollup@3.20.2)(vite@4.2.1):
|
||||
resolution: {integrity: sha512-hyIxg2qJaRs0LoB3Tqy9ML8yEublIzTzFVXmNhgw2jsjETJUXeR6iQ4YPHk3Q6kTbbiwgoPPyXimlAfEwektnA==}
|
||||
/vite-plugin-inspect@0.7.19(rollup@3.20.2)(vite@4.2.1):
|
||||
resolution: {integrity: sha512-OdKObJGdzOMR7SuqykN/Rb6rVtMK1wp4EmUTM3xhTCuSR1K/oM7fi4CKeBWhpYSkqop7O4gVB/MOUk7+RO7gIQ==}
|
||||
engines: {node: '>=14'}
|
||||
peerDependencies:
|
||||
vite: ^3.1.0 || ^4.0.0
|
||||
@@ -4920,19 +4958,19 @@ packages:
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
/vite-plugin-solid@2.6.1(solid-js@1.7.1)(vite@4.2.1):
|
||||
resolution: {integrity: sha512-/khM/ha3B5/pTWQWVJd/0n6ODPIrOcajwhbrD8Gnv37XmJJssu+KA8ssN73raMIicf2eiQKiTAV39w7dSl4Irg==}
|
||||
/vite-plugin-solid@2.7.0(solid-js@1.7.2)(vite@4.2.1):
|
||||
resolution: {integrity: sha512-avp/Jl5zOp/Itfo67xtDB2O61U7idviaIp4mLsjhCa13PjKNasz+IID0jYTyqUp9SFx6/PmBr6v4KgDppqompg==}
|
||||
peerDependencies:
|
||||
solid-js: ^1.3.17 || ^1.4.0 || ^1.5.0 || ^1.6.0
|
||||
solid-js: ^1.7.2
|
||||
vite: ^3.0.0 || ^4.0.0
|
||||
dependencies:
|
||||
'@babel/core': 7.21.4
|
||||
'@babel/preset-typescript': 7.21.4(@babel/core@7.21.4)
|
||||
'@types/babel__core': 7.20.0
|
||||
babel-preset-solid: 1.7.1(@babel/core@7.21.4)
|
||||
babel-preset-solid: 1.7.2(@babel/core@7.21.4)
|
||||
merge-anything: 5.1.4
|
||||
solid-js: 1.7.1
|
||||
solid-refresh: 0.5.2(solid-js@1.7.1)
|
||||
solid-js: 1.7.2
|
||||
solid-refresh: 0.5.2(solid-js@1.7.2)
|
||||
vite: 4.2.1(@types/node@18.15.11)
|
||||
vitefu: 0.2.4(vite@4.2.1)
|
||||
transitivePeerDependencies:
|
||||
@@ -4974,7 +5012,7 @@ packages:
|
||||
'@types/node': 18.15.11
|
||||
esbuild: 0.17.15
|
||||
postcss: 8.4.21
|
||||
resolve: 1.22.1
|
||||
resolve: 1.22.2
|
||||
rollup: 3.20.2
|
||||
optionalDependencies:
|
||||
fsevents: 2.3.2
|
||||
|
||||
@@ -37,7 +37,7 @@ export default function App() {
|
||||
<header class='text-sm font-semibold uppercase'>
|
||||
Activity
|
||||
</header>
|
||||
<For each={[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]}>
|
||||
<For each={[1, 2, 3, 4]}>
|
||||
{() =>
|
||||
<Presence>
|
||||
<Motion
|
||||
|
||||
@@ -1,13 +1,15 @@
|
||||
import { Motion, Presence } from "@motionone/solid";
|
||||
import { MutinyBalance } from "@mutinywallet/node-manager";
|
||||
import { createResource, Show, Suspense } from "solid-js";
|
||||
|
||||
import { useNodeManager } from "~/state/nodeManagerState";
|
||||
import { ButtonLink } from "./Button";
|
||||
import { useMegaStore } from "~/state/megaStore";
|
||||
|
||||
function prettyPrintAmount(n?: number | bigint): string {
|
||||
if (!n || n.valueOf() === 0) {
|
||||
return "0"
|
||||
}
|
||||
return n.toLocaleString().replaceAll(",", "_")
|
||||
return n.toLocaleString()
|
||||
}
|
||||
|
||||
function prettyPrintBalance(b: MutinyBalance): string {
|
||||
@@ -15,7 +17,20 @@ function prettyPrintBalance(b: MutinyBalance): string {
|
||||
}
|
||||
|
||||
export default function BalanceBox() {
|
||||
const { balance, refetchBalance } = useNodeManager();
|
||||
const [state, _] = useMegaStore();
|
||||
|
||||
const fetchBalance = async () => {
|
||||
if (state.node_manager) {
|
||||
console.log("Refetching balance");
|
||||
await state.node_manager.sync();
|
||||
const balance = await state.node_manager.get_balance();
|
||||
return balance
|
||||
} else {
|
||||
return undefined
|
||||
}
|
||||
};
|
||||
|
||||
const [balance, { refetch: refetchBalance }] = createResource(fetchBalance);
|
||||
|
||||
return (
|
||||
<Presence>
|
||||
@@ -31,12 +46,17 @@ export default function BalanceBox() {
|
||||
</header>
|
||||
<div onClick={refetchBalance}>
|
||||
<h1 class='text-4xl font-light'>
|
||||
{balance() && prettyPrintBalance(balance())} <span class='text-xl'>SAT</span>
|
||||
<Suspense fallback={"..."}>
|
||||
<Show when={balance()}>
|
||||
{/* TODO: no-non-null-asssertion but type narrowing just isn't working */}
|
||||
{prettyPrintBalance(balance()!)} <span class='text-xl'>SAT</span>
|
||||
</Show>
|
||||
</Suspense>
|
||||
</h1>
|
||||
</div>
|
||||
<div class="flex gap-2 py-4">
|
||||
<button class='bg-[#1EA67F] p-4 flex-1 rounded-xl text-xl font-semibold '><span class="drop-shadow-sm shadow-black">Send</span></button>
|
||||
<button class='bg-[#3B6CCC] p-4 flex-1 rounded-xl text-xl font-semibold '><span class="drop-shadow-sm shadow-black">Receive</span></button>
|
||||
<ButtonLink href="/scanner" intent="green">Send</ButtonLink>
|
||||
<ButtonLink href="/receive" intent="blue">Receive</ButtonLink>
|
||||
</div>
|
||||
</div>
|
||||
</Motion>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { cva, VariantProps } from "class-variance-authority";
|
||||
import { children, JSX, ParentComponent, splitProps } from "solid-js";
|
||||
import { A } from "solid-start";
|
||||
|
||||
const button = cva(["p-4", "rounded-xl", "text-xl", "font-semibold"], {
|
||||
variants: {
|
||||
@@ -7,7 +8,8 @@ const button = cva(["p-4", "rounded-xl", "text-xl", "font-semibold"], {
|
||||
active: "bg-white text-black",
|
||||
inactive: "bg-black text-white border border-white",
|
||||
blue: "bg-[#3B6CCC] text-white",
|
||||
red: "bg-[#F61D5B] text-white"
|
||||
red: "bg-[#F61D5B] text-white",
|
||||
green: "bg-[#1EA67F] text-white",
|
||||
},
|
||||
layout: {
|
||||
flex: "flex-1",
|
||||
@@ -43,4 +45,27 @@ export const Button: ParentComponent<ButtonProps> = props => {
|
||||
{slot()}
|
||||
</button>
|
||||
)
|
||||
}
|
||||
|
||||
interface ButtonLinkProps extends JSX.ButtonHTMLAttributes<HTMLAnchorElement>, StyleProps {
|
||||
href: string
|
||||
}
|
||||
|
||||
export const ButtonLink: ParentComponent<ButtonLinkProps> = props => {
|
||||
const slot = children(() => props.children)
|
||||
const [local, attrs] = splitProps(props, ['children', 'intent', 'layout', 'class', 'href'])
|
||||
|
||||
return (
|
||||
<A
|
||||
href={local.href}
|
||||
{...attrs}
|
||||
class={button({
|
||||
class: `flex justify-center no-underline ${local.class || ""}`,
|
||||
intent: local.intent,
|
||||
layout: local.layout,
|
||||
})}
|
||||
>
|
||||
{slot()}
|
||||
</A>
|
||||
)
|
||||
}
|
||||
@@ -4,14 +4,16 @@ import settings from '~/assets/icons/settings.svg';
|
||||
|
||||
import { A } from "solid-start";
|
||||
|
||||
type ActiveTab = 'home' | 'scan' | 'settings';
|
||||
type ActiveTab = 'home' | 'scan' | 'settings' | 'none';
|
||||
|
||||
export default function NavBar(props: { activeTab: ActiveTab }) {
|
||||
const activeStyle = 'h-full border-t-2 border-b-2 border-b-black flex flex-col justify-center'
|
||||
return (<nav class='bg-black fixed bottom-0 shadow-lg z-40 w-full safe-bottom'>
|
||||
<ul class='h-16 flex justify-between px-16 items-center'>
|
||||
<li class={props.activeTab === "home" ? activeStyle : ""}>
|
||||
<img src={mutiny_m} alt="home" />
|
||||
<A href="/">
|
||||
<img src={mutiny_m} alt="home" />
|
||||
</A>
|
||||
</li>
|
||||
<li class={props.activeTab === "scan" ? activeStyle : ""}>
|
||||
<A href="/scanner">
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
export default function SafeArea(props) {
|
||||
import { JSX } from "solid-js";
|
||||
|
||||
export default function SafeArea(props: { children: JSX.Element }) {
|
||||
return (
|
||||
<div class="safe-top safe-left safe-right safe-bottom">
|
||||
<div class="disable-scrollbars max-h-screen h-full overflow-y-scroll">
|
||||
|
||||
@@ -52,12 +52,12 @@ export async function checkForWasm() {
|
||||
}
|
||||
}
|
||||
|
||||
export async function setupNodeManager(settings?: NodeManagerSettingStrings): Promise<NodeManager> {
|
||||
export async function setupNodeManager(): Promise<NodeManager> {
|
||||
const _ = await init();
|
||||
|
||||
console.time("Setup");
|
||||
console.log("Starting setup...")
|
||||
const { network, proxy, esplora } = await setAndGetMutinySettings(settings)
|
||||
const { network, proxy, esplora } = await setAndGetMutinySettings()
|
||||
console.log("Initializing Node Manager")
|
||||
console.log("Using network", network);
|
||||
console.log("Using proxy", proxy);
|
||||
|
||||
@@ -13,6 +13,7 @@ import {
|
||||
Title,
|
||||
} from "solid-start";
|
||||
import "./root.css";
|
||||
import { Provider as MegaStoreProvider } from "./state/megaStore";
|
||||
|
||||
export default function Root() {
|
||||
return (
|
||||
@@ -34,9 +35,11 @@ export default function Root() {
|
||||
<Body>
|
||||
<Suspense>
|
||||
<ErrorBoundary>
|
||||
<Routes>
|
||||
<FileRoutes />
|
||||
</Routes>
|
||||
<MegaStoreProvider>
|
||||
<Routes>
|
||||
<FileRoutes />
|
||||
</Routes>
|
||||
</MegaStoreProvider>
|
||||
</ErrorBoundary>
|
||||
</Suspense>
|
||||
<Scripts />
|
||||
|
||||
72
src/routes/Receive.tsx
Normal file
72
src/routes/Receive.tsx
Normal file
@@ -0,0 +1,72 @@
|
||||
import { createResource, Show } from "solid-js";
|
||||
import { QRCodeSVG } from "solid-qr-code";
|
||||
import { Button } from "~/components/Button";
|
||||
import NavBar from "~/components/NavBar";
|
||||
import SafeArea from "~/components/SafeArea";
|
||||
import { useMegaStore } from "~/state/megaStore";
|
||||
import { useCopy } from "~/utils/useCopy";
|
||||
|
||||
export default function Receive() {
|
||||
const [state, _] = useMegaStore()
|
||||
|
||||
// TODO: would be nice if this was just newest unused address
|
||||
const getNewAddress = async () => {
|
||||
if (state.node_manager) {
|
||||
console.log("Getting new address");
|
||||
const address = await state.node_manager?.get_new_address();
|
||||
return address
|
||||
} else {
|
||||
return undefined
|
||||
}
|
||||
};
|
||||
|
||||
const [address, { refetch: refetchAddress }] = createResource(getNewAddress);
|
||||
|
||||
const [copy, copied] = useCopy({ copiedTimeout: 1000 });
|
||||
|
||||
async function share() {
|
||||
// If the browser doesn't support share we can just copy the address
|
||||
if (!navigator.share) {
|
||||
copy(address() ?? "");
|
||||
copied();
|
||||
|
||||
}
|
||||
const shareData: ShareData = {
|
||||
title: "Mutiny Wallet",
|
||||
text: address(),
|
||||
}
|
||||
|
||||
try {
|
||||
await navigator.share(shareData)
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<SafeArea>
|
||||
<main class='flex flex-col py-8 px-4 items-center'>
|
||||
<div class="max-w-[400px] flex flex-col gap-4">
|
||||
<Show when={address()}>
|
||||
<div class="w-full bg-white rounded-xl">
|
||||
<QRCodeSVG value={address() ?? ""} class="w-full h-full p-8 max-h-[400px]" />
|
||||
</div>
|
||||
<div class="flex gap-2 w-full">
|
||||
<Button onClick={() => copy(address() ?? "")}>{copied() ? "Copied" : "Copy"}</Button>
|
||||
<Button onClick={share}>Share</Button>
|
||||
</div>
|
||||
<div class="rounded-xl p-4 flex flex-col gap-2 bg-[rgba(0,0,0,0.5)]">
|
||||
<header class='text-sm font-semibold uppercase'>
|
||||
Address / Invoice
|
||||
</header>
|
||||
<code class="break-all">{address()}</code>
|
||||
<Button onClick={refetchAddress}>Get new address</Button>
|
||||
</div>
|
||||
</Show>
|
||||
</div>
|
||||
</main>
|
||||
<NavBar activeTab="none" />
|
||||
</SafeArea >
|
||||
|
||||
)
|
||||
}
|
||||
@@ -1,18 +1,33 @@
|
||||
import { useNavigate } from "solid-start";
|
||||
import { Button } from "~/components/Button";
|
||||
import NavBar from "~/components/NavBar";
|
||||
import SafeArea from "~/components/SafeArea";
|
||||
import { useMegaStore } from "~/state/megaStore";
|
||||
|
||||
export default function Settings() {
|
||||
const navigate = useNavigate();
|
||||
|
||||
const [_, actions] = useMegaStore();
|
||||
|
||||
function clearWaitlistId() {
|
||||
localStorage.removeItem('waitlist_id');
|
||||
window.location.reload();
|
||||
actions.setWaitlistId('');
|
||||
navigate("/")
|
||||
}
|
||||
|
||||
function setTestWaitlistId() {
|
||||
localStorage.setItem('waitlist_id', 'npub17zcnktw7svnechf5g666t33d7slw36sz8el3ep4c7kmyfwjhxn9qjvavs6');
|
||||
// reload the window
|
||||
window.location.reload();
|
||||
actions.setWaitlistId('npub17zcnktw7svnechf5g666t33d7slw36sz8el3ep4c7kmyfwjhxn9qjvavs6');
|
||||
navigate("/")
|
||||
}
|
||||
|
||||
function resetNode() {
|
||||
Object.keys(localStorage).forEach(function (key) {
|
||||
if (key.startsWith('waitlist_id')) {
|
||||
// Don't do anything because it's annoying to set my waitlist_id every time
|
||||
} else {
|
||||
localStorage.removeItem(key);
|
||||
}
|
||||
});
|
||||
navigate("/")
|
||||
}
|
||||
|
||||
return (
|
||||
@@ -20,6 +35,7 @@ export default function Settings() {
|
||||
<main class='flex flex-col gap-4 py-8 px-4'>
|
||||
<Button onClick={clearWaitlistId}>Clear waitlist_id</Button>
|
||||
<Button onClick={setTestWaitlistId}>Use test waitlist_id</Button>
|
||||
<Button onClick={resetNode}>Reset node</Button>
|
||||
</main>
|
||||
<NavBar activeTab="settings" />
|
||||
</SafeArea>
|
||||
|
||||
@@ -1,48 +1,27 @@
|
||||
|
||||
import App from "~/components/App";
|
||||
import { Accessor, createEffect, createResource, Setter, createSignal, Switch, Match } from "solid-js";
|
||||
import { Switch, Match } from "solid-js";
|
||||
import { WaitlistAlreadyIn } from "~/components/waitlist/WaitlistAlreadyIn";
|
||||
import WaitlistForm from "~/components/waitlist/WaitlistForm";
|
||||
import ReloadPrompt from "~/components/Reload";
|
||||
import { NodeManagerProvider } from "~/state/nodeManagerState";
|
||||
|
||||
function createWaitListSignal(): [Accessor<string>, Setter<string>] {
|
||||
const [state, setState] = createSignal("");
|
||||
const originalState = localStorage.getItem("waitlist_id")
|
||||
if (originalState) {
|
||||
setState(localStorage.getItem("waitlist_id") || "");
|
||||
}
|
||||
createEffect(() => localStorage.setItem("waitlist_id", state()));
|
||||
return [state, setState];
|
||||
}
|
||||
|
||||
async function fetchData(source: string) {
|
||||
if (source) {
|
||||
const data = await fetch(`https://waitlist.mutiny-waitlist.workers.dev/waitlist/${source}`);
|
||||
return data.json();
|
||||
} else {
|
||||
return null
|
||||
}
|
||||
}
|
||||
import { useMegaStore } from "~/state/megaStore";
|
||||
|
||||
export default function Home() {
|
||||
// On load, check if the user is already on the waitlist
|
||||
const [waitlistId] = createWaitListSignal();
|
||||
const [waitlistData] = createResource(waitlistId, fetchData);
|
||||
const [state, _] = useMegaStore();
|
||||
|
||||
return (
|
||||
<>
|
||||
<ReloadPrompt />
|
||||
|
||||
<Switch fallback={<>Loading...</>} >
|
||||
<Match when={waitlistData() && waitlistData().approval_date}>
|
||||
<NodeManagerProvider>
|
||||
<App />
|
||||
</NodeManagerProvider>
|
||||
{/* TODO: might need this state.node_manager guard on all wallet routes */}
|
||||
<Match when={state.user_status === "approved" && state.node_manager}>
|
||||
<App />
|
||||
</Match>
|
||||
<Match when={waitlistData() && waitlistData().date}>
|
||||
<Match when={state.user_status === "waitlisted"}>
|
||||
<WaitlistAlreadyIn />
|
||||
</Match>
|
||||
<Match when={!waitlistData.loading && !waitlistData()}>
|
||||
<Match when={state.user_status === "new_here"}>
|
||||
<WaitlistForm />
|
||||
</Match>
|
||||
</Switch>
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
import { Outlet } from "solid-start";
|
||||
|
||||
export default function UsersLayout() {
|
||||
return (
|
||||
<div>
|
||||
<h1>Users</h1>
|
||||
<Outlet />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
100
src/state/megaStore.tsx
Normal file
100
src/state/megaStore.tsx
Normal file
@@ -0,0 +1,100 @@
|
||||
// Inspired by https://github.com/solidjs/solid-realworld/blob/main/src/store/index.js
|
||||
|
||||
import { ParentComponent, createContext, createEffect, useContext } from "solid-js";
|
||||
import { createStore } from "solid-js/store";
|
||||
import { setupNodeManager } from "~/logic/nodeManagerSetup";
|
||||
import { NodeManager } from "@mutinywallet/node-manager";
|
||||
|
||||
const MegaStoreContext = createContext<MegaStore>();
|
||||
|
||||
type UserStatus = undefined | "new_here" | "waitlisted" | "approved" | "paid"
|
||||
|
||||
export type MegaStore = [{
|
||||
waitlist_id: string | null;
|
||||
node_manager: NodeManager | undefined;
|
||||
user_status: UserStatus;
|
||||
}, {
|
||||
status(): Promise<UserStatus>;
|
||||
setupNodeManager(): Promise<void>;
|
||||
setWaitlistId(waitlist_id: string): void;
|
||||
}];
|
||||
|
||||
export const Provider: ParentComponent = (props) => {
|
||||
const [state, setState] = createStore({
|
||||
|
||||
waitlist_id: localStorage.getItem("waitlist_id"),
|
||||
node_manager: undefined as NodeManager | undefined,
|
||||
user_status: undefined as UserStatus,
|
||||
});
|
||||
|
||||
const actions = {
|
||||
async status(): Promise<UserStatus> {
|
||||
if (!state.waitlist_id) {
|
||||
return "new_here"
|
||||
}
|
||||
try {
|
||||
const res = await fetch(`https://waitlist.mutiny-waitlist.workers.dev/waitlist/${state.waitlist_id}`)
|
||||
const data = await res.json();
|
||||
|
||||
if (data.approval_date) {
|
||||
return "approved"
|
||||
} else {
|
||||
return "waitlisted"
|
||||
}
|
||||
|
||||
// TODO: handle paid status
|
||||
|
||||
} catch (e) {
|
||||
return "new_here"
|
||||
}
|
||||
|
||||
},
|
||||
async setupNodeManager(): Promise<void> {
|
||||
try {
|
||||
const nodeManager = await setupNodeManager()
|
||||
setState({ node_manager: nodeManager })
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
}
|
||||
},
|
||||
setWaitlistId(waitlist_id: string) {
|
||||
setState({ waitlist_id })
|
||||
}
|
||||
};
|
||||
|
||||
// Fetch status from remote on load
|
||||
createEffect(async () => {
|
||||
const status = await actions.status()
|
||||
setState({ user_status: status })
|
||||
})
|
||||
|
||||
// Only node manager when status is approved
|
||||
createEffect(async () => {
|
||||
if (state.user_status === "approved" && !state.node_manager) {
|
||||
console.log("running setup node manager...")
|
||||
await actions.setupNodeManager()
|
||||
}
|
||||
})
|
||||
|
||||
// Be reactive to changes in waitlist_id
|
||||
createEffect(() => {
|
||||
state.waitlist_id ? localStorage.setItem("waitlist_id", state.waitlist_id) : localStorage.removeItem("waitlist_id");
|
||||
});
|
||||
|
||||
const store = [state, actions] as MegaStore;
|
||||
|
||||
return (
|
||||
<MegaStoreContext.Provider value={store}>
|
||||
{props.children}
|
||||
</MegaStoreContext.Provider>
|
||||
)
|
||||
}
|
||||
|
||||
export function useMegaStore() {
|
||||
// This is a trick to narrow the typescript types: https://docs.solidjs.com/references/api-reference/component-apis/createContext
|
||||
const context = useContext(MegaStoreContext);
|
||||
if (!context) {
|
||||
throw new Error("useMegaStore: cannot find a MegaStoreContext")
|
||||
}
|
||||
return context;
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
import { NodeManager } from "@mutinywallet/node-manager";
|
||||
import { createContext, JSX, useContext, createResource } from "solid-js";
|
||||
import { setupNodeManager } from "~/logic/nodeManagerSetup";
|
||||
|
||||
const NodeManagerContext = createContext();
|
||||
|
||||
export function NodeManagerProvider(props: { children: JSX.Element }) {
|
||||
const [nodeManager] = createResource({}, setupNodeManager);
|
||||
|
||||
const fetchBalance = async (nm: NodeManager) => {
|
||||
console.log("refetching balance");
|
||||
const balance = await nm.get_balance();
|
||||
return balance
|
||||
};
|
||||
|
||||
const [balance, { refetch }] = createResource(nodeManager, fetchBalance);
|
||||
|
||||
const value = {
|
||||
nodeManager,
|
||||
balance,
|
||||
refetchBalance: refetch
|
||||
};
|
||||
|
||||
return (
|
||||
<NodeManagerContext.Provider value={value}>
|
||||
{props.children}
|
||||
</NodeManagerContext.Provider>
|
||||
)
|
||||
}
|
||||
|
||||
export function useNodeManager() { return useContext(NodeManagerContext); }
|
||||
21
src/utils/useCopy.ts
Normal file
21
src/utils/useCopy.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
// Thanks you https://soorria.com/snippets/use-copy-solidjs
|
||||
import type { Accessor } from 'solid-js'
|
||||
import { createSignal } from 'solid-js'
|
||||
export type UseCopyProps = {
|
||||
copiedTimeout?: number
|
||||
}
|
||||
type CopyFn = (text: string) => Promise<void>
|
||||
export const useCopy = ({ copiedTimeout = 2000 }: UseCopyProps = {}): [
|
||||
copy: CopyFn,
|
||||
copied: Accessor<boolean>
|
||||
] => {
|
||||
const [copied, setCopied] = createSignal(false)
|
||||
let timeout: NodeJS.Timeout
|
||||
const copy: CopyFn = async text => {
|
||||
await navigator.clipboard.writeText(text)
|
||||
setCopied(true)
|
||||
if (timeout) clearTimeout(timeout)
|
||||
timeout = setTimeout(() => setCopied(false), copiedTimeout)
|
||||
}
|
||||
return [copy, copied]
|
||||
}
|
||||
Reference in New Issue
Block a user