SebFox2011 2 years ago
parent
commit
b60fbf0a43
  1. 185
      pnpm-lock.yaml
  2. 17
      src/components/PageComponents/Config/Bluetooth.tsx
  3. 2
      src/components/Sidebar.tsx
  4. 2
      src/core/utils/x25519.ts

185
pnpm-lock.yaml

@ -127,7 +127,7 @@ importers:
version: 3.0.6([email protected])
vite-plugin-node-polyfills:
specifier: ^0.22.0
version: 0.22.0(rollup@4.18.0)([email protected](@types/[email protected]))
version: 0.22.0(rollup@4.24.0)([email protected](@types/[email protected]))
zustand:
specifier: 4.5.2
version: 4.5.2(@types/[email protected])([email protected])([email protected])
@ -173,7 +173,7 @@ importers:
version: 8.4.38
rollup-plugin-visualizer:
specifier: ^5.12.0
version: 5.12.0(rollup@4.18.0)
version: 5.12.0(rollup@4.24.0)
tailwindcss:
specifier: ^3.4.4
version: 3.4.4
@ -1165,83 +1165,83 @@ packages:
rollup:
optional: true
'@rollup/rollup-android-arm-eabi@4.18.0':
resolution: {integrity: sha512-Tya6xypR10giZV1XzxmH5wr25VcZSncG0pZIjfePT0OVBvqNEurzValetGNarVrGiq66EBVAFn15iYX4w6FKgQ==}
'@rollup/rollup-android-arm-eabi@4.24.0':
resolution: {integrity: sha512-Q6HJd7Y6xdB48x8ZNVDOqsbh2uByBhgK8PiQgPhwkIw/HC/YX5Ghq2mQY5sRMZWHb3VsFkWooUVOZHKr7DmDIA==}
cpu: [arm]
os: [android]
'@rollup/rollup-android-arm64@4.18.0':
resolution: {integrity: sha512-avCea0RAP03lTsDhEyfy+hpfr85KfyTctMADqHVhLAF3MlIkq83CP8UfAHUssgXTYd+6er6PaAhx/QGv4L1EiA==}
'@rollup/rollup-android-arm64@4.24.0':
resolution: {integrity: sha512-ijLnS1qFId8xhKjT81uBHuuJp2lU4x2yxa4ctFPtG+MqEE6+C5f/+X/bStmxapgmwLwiL3ih122xv8kVARNAZA==}
cpu: [arm64]
os: [android]
'@rollup/rollup-darwin-arm64@4.18.0':
resolution: {integrity: sha512-IWfdwU7KDSm07Ty0PuA/W2JYoZ4iTj3TUQjkVsO/6U+4I1jN5lcR71ZEvRh52sDOERdnNhhHU57UITXz5jC1/w==}
'@rollup/rollup-darwin-arm64@4.24.0':
resolution: {integrity: sha512-bIv+X9xeSs1XCk6DVvkO+S/z8/2AMt/2lMqdQbMrmVpgFvXlmde9mLcbQpztXm1tajC3raFDqegsH18HQPMYtA==}
cpu: [arm64]
os: [darwin]
'@rollup/rollup-darwin-x64@4.18.0':
resolution: {integrity: sha512-n2LMsUz7Ynu7DoQrSQkBf8iNrjOGyPLrdSg802vk6XT3FtsgX6JbE8IHRvposskFm9SNxzkLYGSq9QdpLYpRNA==}
'@rollup/rollup-darwin-x64@4.24.0':
resolution: {integrity: sha512-X6/nOwoFN7RT2svEQWUsW/5C/fYMBe4fnLK9DQk4SX4mgVBiTA9h64kjUYPvGQ0F/9xwJ5U5UfTbl6BEjaQdBQ==}
cpu: [x64]
os: [darwin]
'@rollup/rollup-linux-arm-gnueabihf@4.18.0':
resolution: {integrity: sha512-C/zbRYRXFjWvz9Z4haRxcTdnkPt1BtCkz+7RtBSuNmKzMzp3ZxdM28Mpccn6pt28/UWUCTXa+b0Mx1k3g6NOMA==}
'@rollup/rollup-linux-arm-gnueabihf@4.24.0':
resolution: {integrity: sha512-0KXvIJQMOImLCVCz9uvvdPgfyWo93aHHp8ui3FrtOP57svqrF/roSSR5pjqL2hcMp0ljeGlU4q9o/rQaAQ3AYA==}
cpu: [arm]
os: [linux]
'@rollup/rollup-linux-arm-musleabihf@4.18.0':
resolution: {integrity: sha512-l3m9ewPgjQSXrUMHg93vt0hYCGnrMOcUpTz6FLtbwljo2HluS4zTXFy2571YQbisTnfTKPZ01u/ukJdQTLGh9A==}
'@rollup/rollup-linux-arm-musleabihf@4.24.0':
resolution: {integrity: sha512-it2BW6kKFVh8xk/BnHfakEeoLPv8STIISekpoF+nBgWM4d55CZKc7T4Dx1pEbTnYm/xEKMgy1MNtYuoA8RFIWw==}
cpu: [arm]
os: [linux]
'@rollup/rollup-linux-arm64-gnu@4.18.0':
resolution: {integrity: sha512-rJ5D47d8WD7J+7STKdCUAgmQk49xuFrRi9pZkWoRD1UeSMakbcepWXPF8ycChBoAqs1pb2wzvbY6Q33WmN2ftw==}
'@rollup/rollup-linux-arm64-gnu@4.24.0':
resolution: {integrity: sha512-i0xTLXjqap2eRfulFVlSnM5dEbTVque/3Pi4g2y7cxrs7+a9De42z4XxKLYJ7+OhE3IgxvfQM7vQc43bwTgPwA==}
cpu: [arm64]
os: [linux]
'@rollup/rollup-linux-arm64-musl@4.18.0':
resolution: {integrity: sha512-be6Yx37b24ZwxQ+wOQXXLZqpq4jTckJhtGlWGZs68TgdKXJgw54lUUoFYrg6Zs/kjzAQwEwYbp8JxZVzZLRepQ==}
'@rollup/rollup-linux-arm64-musl@4.24.0':
resolution: {integrity: sha512-9E6MKUJhDuDh604Qco5yP/3qn3y7SLXYuiC0Rpr89aMScS2UAmK1wHP2b7KAa1nSjWJc/f/Lc0Wl1L47qjiyQw==}
cpu: [arm64]
os: [linux]
'@rollup/rollup-linux-powerpc64le-gnu@4.18.0':
resolution: {integrity: sha512-hNVMQK+qrA9Todu9+wqrXOHxFiD5YmdEi3paj6vP02Kx1hjd2LLYR2eaN7DsEshg09+9uzWi2W18MJDlG0cxJA==}
'@rollup/rollup-linux-powerpc64le-gnu@4.24.0':
resolution: {integrity: sha512-2XFFPJ2XMEiF5Zi2EBf4h73oR1V/lycirxZxHZNc93SqDN/IWhYYSYj8I9381ikUFXZrz2v7r2tOVk2NBwxrWw==}
cpu: [ppc64]
os: [linux]
'@rollup/rollup-linux-riscv64-gnu@4.18.0':
resolution: {integrity: sha512-ROCM7i+m1NfdrsmvwSzoxp9HFtmKGHEqu5NNDiZWQtXLA8S5HBCkVvKAxJ8U+CVctHwV2Gb5VUaK7UAkzhDjlg==}
'@rollup/rollup-linux-riscv64-gnu@4.24.0':
resolution: {integrity: sha512-M3Dg4hlwuntUCdzU7KjYqbbd+BLq3JMAOhCKdBE3TcMGMZbKkDdJ5ivNdehOssMCIokNHFOsv7DO4rlEOfyKpg==}
cpu: [riscv64]
os: [linux]
'@rollup/rollup-linux-s390x-gnu@4.18.0':
resolution: {integrity: sha512-0UyyRHyDN42QL+NbqevXIIUnKA47A+45WyasO+y2bGJ1mhQrfrtXUpTxCOrfxCR4esV3/RLYyucGVPiUsO8xjg==}
'@rollup/rollup-linux-s390x-gnu@4.24.0':
resolution: {integrity: sha512-mjBaoo4ocxJppTorZVKWFpy1bfFj9FeCMJqzlMQGjpNPY9JwQi7OuS1axzNIk0nMX6jSgy6ZURDZ2w0QW6D56g==}
cpu: [s390x]
os: [linux]
'@rollup/rollup-linux-x64-gnu@4.18.0':
resolution: {integrity: sha512-xuglR2rBVHA5UsI8h8UbX4VJ470PtGCf5Vpswh7p2ukaqBGFTnsfzxUBetoWBWymHMxbIG0Cmx7Y9qDZzr648w==}
'@rollup/rollup-linux-x64-gnu@4.24.0':
resolution: {integrity: sha512-ZXFk7M72R0YYFN5q13niV0B7G8/5dcQ9JDp8keJSfr3GoZeXEoMHP/HlvqROA3OMbMdfr19IjCeNAnPUG93b6A==}
cpu: [x64]
os: [linux]
'@rollup/rollup-linux-x64-musl@4.18.0':
resolution: {integrity: sha512-LKaqQL9osY/ir2geuLVvRRs+utWUNilzdE90TpyoX0eNqPzWjRm14oMEE+YLve4k/NAqCdPkGYDaDF5Sw+xBfg==}
'@rollup/rollup-linux-x64-musl@4.24.0':
resolution: {integrity: sha512-w1i+L7kAXZNdYl+vFvzSZy8Y1arS7vMgIy8wusXJzRrPyof5LAb02KGr1PD2EkRcl73kHulIID0M501lN+vobQ==}
cpu: [x64]
os: [linux]
'@rollup/rollup-win32-arm64-msvc@4.18.0':
resolution: {integrity: sha512-7J6TkZQFGo9qBKH0pk2cEVSRhJbL6MtfWxth7Y5YmZs57Pi+4x6c2dStAUvaQkHQLnEQv1jzBUW43GvZW8OFqA==}
'@rollup/rollup-win32-arm64-msvc@4.24.0':
resolution: {integrity: sha512-VXBrnPWgBpVDCVY6XF3LEW0pOU51KbaHhccHw6AS6vBWIC60eqsH19DAeeObl+g8nKAz04QFdl/Cefta0xQtUQ==}
cpu: [arm64]
os: [win32]
'@rollup/rollup-win32-ia32-msvc@4.18.0':
resolution: {integrity: sha512-Txjh+IxBPbkUB9+SXZMpv+b/vnTEtFyfWZgJ6iyCmt2tdx0OF5WhFowLmnh8ENGNpfUlUZkdI//4IEmhwPieNg==}
'@rollup/rollup-win32-ia32-msvc@4.24.0':
resolution: {integrity: sha512-xrNcGDU0OxVcPTH/8n/ShH4UevZxKIO6HJFK0e15XItZP2UcaiLFd5kiX7hJnqCbSztUF8Qot+JWBC/QXRPYWQ==}
cpu: [ia32]
os: [win32]
'@rollup/rollup-win32-x64-msvc@4.18.0':
resolution: {integrity: sha512-UOo5FdvOL0+eIVTgS4tIdbW+TtnBLWg1YBCcU2KWM7nuNwRz9bksDX1bekJJCpu25N1DVWaCwnT39dVQxzqS8g==}
'@rollup/rollup-win32-x64-msvc@4.24.0':
resolution: {integrity: sha512-fbMkAF7fufku0N2dE5TBXcNlg0pt0cJue4xBRE2Qc5Vqikxr4VCgKj/ht6SMdFcOacVA9rqF70APJ8RN/4vMJw==}
cpu: [x64]
os: [win32]
@ -1669,6 +1669,9 @@ packages:
'@types/[email protected]':
resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==}
'@types/[email protected]':
resolution: {integrity: sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==}
'@types/[email protected]':
resolution: {integrity: sha512-vPDXOZuannb9FZdxgHnqSwAG/jvdGM8Wq+6N4D/d80z+D4HWH+bItqsZaVRQykAn6WEVeEkLm2oQigyHtgb0RA==}
@ -2050,8 +2053,8 @@ packages:
[email protected]:
resolution: {integrity: sha512-7L8fC2Ey/b6SePDFKR2zHAy4mbdp1/38Yk5TsARO66W3hC5KEaeKMMHoxwtuH+jcu2AYLSn9QX04i95t6Fl1Hg==}
elliptic@6.5.7:
resolution: {integrity: sha512-ESVCtTwiA+XhY3wyh24QqRGBoP3rEdDUl3EDUUo9tft074fi19IrdpH7hLCMMP3CIj7jb3W96rn8lt/BqIlt5Q==}
elliptic@6.6.0:
resolution: {integrity: sha512-dpwoQcLc/2WLQvJvLRHKZ+f9FgOdjnq11rurqwekGQygGPsYSK29OMMD2WalatiqQ+XGFDglTNixpPfI+lpaAA==}
[email protected]:
resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==}
@ -2484,8 +2487,8 @@ packages:
resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==}
engines: {node: '>= 8'}
[email protected].7:
resolution: {integrity: sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q==}
[email protected].8:
resolution: {integrity: sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==}
engines: {node: '>=8.6'}
[email protected]:
@ -2913,8 +2916,8 @@ packages:
rollup:
optional: true
rollup@4.18.0:
resolution: {integrity: sha512-QmJz14PX3rzbJCN1SG4Xe/bAAX2a6NpCP8ab2vfu2GiUr8AQcr2nCV/oEO3yneFarB67zk8ShlIyWb2LGTb3Sg==}
rollup@4.24.0:
resolution: {integrity: sha512-DOmrlGSXNk1DM0ljiQA+i+o0rSLhtii1je5wgk60j49d1jHT5YYttBv1iWOnYSTG+fZZESUOSNiAl89SIet+Cg==}
engines: {node: '>=18.0.0', npm: '>=8.0.0'}
hasBin: true
@ -4244,68 +4247,68 @@ snapshots:
'@radix-ui/[email protected]': {}
'@rollup/[email protected](rollup@4.18.0)':
'@rollup/[email protected](rollup@4.24.0)':
dependencies:
'@rollup/pluginutils': 5.1.0(rollup@4.18.0)
'@rollup/pluginutils': 5.1.0(rollup@4.24.0)
estree-walker: 2.0.2
magic-string: 0.30.11
optionalDependencies:
rollup: 4.18.0
rollup: 4.24.0
'@rollup/[email protected](rollup@4.18.0)':
'@rollup/[email protected](rollup@4.24.0)':
dependencies:
'@types/estree': 1.0.5
estree-walker: 2.0.2
picomatch: 2.3.1
optionalDependencies:
rollup: 4.18.0
rollup: 4.24.0
'@rollup/rollup-android-arm-eabi@4.18.0':
'@rollup/rollup-android-arm-eabi@4.24.0':
optional: true
'@rollup/rollup-android-arm64@4.18.0':
'@rollup/rollup-android-arm64@4.24.0':
optional: true
'@rollup/rollup-darwin-arm64@4.18.0':
'@rollup/rollup-darwin-arm64@4.24.0':
optional: true
'@rollup/rollup-darwin-x64@4.18.0':
'@rollup/rollup-darwin-x64@4.24.0':
optional: true
'@rollup/rollup-linux-arm-gnueabihf@4.18.0':
'@rollup/rollup-linux-arm-gnueabihf@4.24.0':
optional: true
'@rollup/rollup-linux-arm-musleabihf@4.18.0':
'@rollup/rollup-linux-arm-musleabihf@4.24.0':
optional: true
'@rollup/rollup-linux-arm64-gnu@4.18.0':
'@rollup/rollup-linux-arm64-gnu@4.24.0':
optional: true
'@rollup/rollup-linux-arm64-musl@4.18.0':
'@rollup/rollup-linux-arm64-musl@4.24.0':
optional: true
'@rollup/rollup-linux-powerpc64le-gnu@4.18.0':
'@rollup/rollup-linux-powerpc64le-gnu@4.24.0':
optional: true
'@rollup/rollup-linux-riscv64-gnu@4.18.0':
'@rollup/rollup-linux-riscv64-gnu@4.24.0':
optional: true
'@rollup/rollup-linux-s390x-gnu@4.18.0':
'@rollup/rollup-linux-s390x-gnu@4.24.0':
optional: true
'@rollup/rollup-linux-x64-gnu@4.18.0':
'@rollup/rollup-linux-x64-gnu@4.24.0':
optional: true
'@rollup/rollup-linux-x64-musl@4.18.0':
'@rollup/rollup-linux-x64-musl@4.24.0':
optional: true
'@rollup/rollup-win32-arm64-msvc@4.18.0':
'@rollup/rollup-win32-arm64-msvc@4.24.0':
optional: true
'@rollup/rollup-win32-ia32-msvc@4.18.0':
'@rollup/rollup-win32-ia32-msvc@4.24.0':
optional: true
'@rollup/rollup-win32-x64-msvc@4.18.0':
'@rollup/rollup-win32-x64-msvc@4.24.0':
optional: true
'@rsbuild/[email protected]':
@ -5223,6 +5226,8 @@ snapshots:
'@types/[email protected]': {}
'@types/[email protected]': {}
'@types/[email protected]':
dependencies:
'@types/filewriter': 0.0.33
@ -5395,7 +5400,7 @@ snapshots:
browserify-rsa: 4.1.0
create-hash: 1.2.0
create-hmac: 1.1.7
elliptic: 6.5.7
elliptic: 6.6.0
hash-base: 3.0.4
inherits: 2.0.4
parse-asn1: 5.1.7
@ -5530,7 +5535,7 @@ snapshots:
[email protected]:
dependencies:
bn.js: 4.12.0
elliptic: 6.5.7
elliptic: 6.6.0
[email protected]:
dependencies:
@ -5671,7 +5676,7 @@ snapshots:
[email protected]: {}
elliptic@6.5.7:
elliptic@6.6.0:
dependencies:
bn.js: 4.12.0
brorand: 1.1.0
@ -5763,7 +5768,7 @@ snapshots:
'@nodelib/fs.walk': 1.2.8
glob-parent: 5.1.2
merge2: 1.4.1
micromatch: 4.0.7
micromatch: 4.0.8
[email protected]:
dependencies:
@ -6166,7 +6171,7 @@ snapshots:
[email protected]: {}
[email protected].7:
[email protected].8:
dependencies:
braces: 3.0.3
picomatch: 2.3.1
@ -6596,35 +6601,35 @@ snapshots:
[email protected]: {}
[email protected](rollup@4.18.0):
[email protected](rollup@4.24.0):
dependencies:
open: 8.4.2
picomatch: 2.3.1
source-map: 0.7.4
yargs: 17.7.2
optionalDependencies:
rollup: 4.18.0
rollup: 4.24.0
rollup@4.18.0:
rollup@4.24.0:
dependencies:
'@types/estree': 1.0.5
'@types/estree': 1.0.6
optionalDependencies:
'@rollup/rollup-android-arm-eabi': 4.18.0
'@rollup/rollup-android-arm64': 4.18.0
'@rollup/rollup-darwin-arm64': 4.18.0
'@rollup/rollup-darwin-x64': 4.18.0
'@rollup/rollup-linux-arm-gnueabihf': 4.18.0
'@rollup/rollup-linux-arm-musleabihf': 4.18.0
'@rollup/rollup-linux-arm64-gnu': 4.18.0
'@rollup/rollup-linux-arm64-musl': 4.18.0
'@rollup/rollup-linux-powerpc64le-gnu': 4.18.0
'@rollup/rollup-linux-riscv64-gnu': 4.18.0
'@rollup/rollup-linux-s390x-gnu': 4.18.0
'@rollup/rollup-linux-x64-gnu': 4.18.0
'@rollup/rollup-linux-x64-musl': 4.18.0
'@rollup/rollup-win32-arm64-msvc': 4.18.0
'@rollup/rollup-win32-ia32-msvc': 4.18.0
'@rollup/rollup-win32-x64-msvc': 4.18.0
'@rollup/rollup-android-arm-eabi': 4.24.0
'@rollup/rollup-android-arm64': 4.24.0
'@rollup/rollup-darwin-arm64': 4.24.0
'@rollup/rollup-darwin-x64': 4.24.0
'@rollup/rollup-linux-arm-gnueabihf': 4.24.0
'@rollup/rollup-linux-arm-musleabihf': 4.24.0
'@rollup/rollup-linux-arm64-gnu': 4.24.0
'@rollup/rollup-linux-arm64-musl': 4.24.0
'@rollup/rollup-linux-powerpc64le-gnu': 4.24.0
'@rollup/rollup-linux-riscv64-gnu': 4.24.0
'@rollup/rollup-linux-s390x-gnu': 4.24.0
'@rollup/rollup-linux-x64-gnu': 4.24.0
'@rollup/rollup-linux-x64-musl': 4.24.0
'@rollup/rollup-win32-arm64-msvc': 4.24.0
'@rollup/rollup-win32-ia32-msvc': 4.24.0
'@rollup/rollup-win32-x64-msvc': 4.24.0
fsevents: 2.3.3
[email protected]:
@ -6810,7 +6815,7 @@ snapshots:
is-glob: 4.0.3
jiti: 1.21.6
lilconfig: 2.1.0
micromatch: 4.0.7
micromatch: 4.0.8
normalize-path: 3.0.0
object-hash: 3.0.0
picocolors: 1.0.1
@ -6960,9 +6965,9 @@ snapshots:
[email protected]: {}
[email protected](rollup@4.18.0)([email protected](@types/[email protected])):
[email protected](rollup@4.24.0)([email protected](@types/[email protected])):
dependencies:
'@rollup/plugin-inject': 5.0.5(rollup@4.18.0)
'@rollup/plugin-inject': 5.0.5(rollup@4.24.0)
node-stdlib-browser: 1.2.0
vite: 5.3.1(@types/[email protected])
transitivePeerDependencies:
@ -6972,7 +6977,7 @@ snapshots:
dependencies:
esbuild: 0.21.5
postcss: 8.4.38
rollup: 4.18.0
rollup: 4.24.0
optionalDependencies:
'@types/node': 20.14.9
fsevents: 2.3.3

17
src/components/PageComponents/Config/Bluetooth.tsx

@ -2,9 +2,24 @@ import type { BluetoothValidation } from "@app/validation/config/bluetooth.tsx";
import { DynamicForm } from "@components/Form/DynamicForm.tsx";
import { useDevice } from "@core/stores/deviceStore.ts";
import { Protobuf } from "@meshtastic/js";
import { useState } from "react";
export const Bluetooth = (): JSX.Element => {
const { config, setWorkingConfig } = useDevice();
const [bluetoothValidationText, setBluetoothValidationText] = useState<string>();
const bluetoothPinChangeEvent = (
e: React.ChangeEvent<HTMLInputElement>,
) => {
if (e.target.value[0] == "0")
{
setBluetoothValidationText("Bluetooth Pin cannot start with 0.");
}
else
{
setBluetoothValidationText("");
}
}
const onSubmit = (data: BluetoothValidation) => {
setWorkingConfig(
@ -52,6 +67,8 @@ export const Bluetooth = (): JSX.Element => {
name: "fixedPin",
label: "Pin",
description: "Pin to use when pairing",
validationText: bluetoothValidationText,
inputChange: bluetoothPinChangeEvent,
disabledBy: [
{
fieldName: "mode",

2
src/components/Sidebar.tsx

@ -80,7 +80,7 @@ export const Sidebar = ({ children }: SidebarProps): JSX.Element => {
<div className="px-8 pb-6">
<div className="flex items-center">
<BatteryMediumIcon size={24} viewBox={"0 0 28 24"} />
<Subtle>{myNode?.deviceMetrics?.batteryLevel ?? "UNK"}%</Subtle>
<Subtle>{myNode?.deviceMetrics?.batteryLevel ? myNode?.deviceMetrics?.batteryLevel > 100 ? "Charging" : myNode?.deviceMetrics?.batteryLevel + "%" : "UNK"}</Subtle>
</div>
<div className="flex items-center">
<ZapIcon size={24} viewBox={"0 0 36 24"} />

2
src/core/utils/x25519.ts

@ -3,6 +3,8 @@ import { x25519 } from "@noble/curves/ed25519";
export function getX25519PrivateKey(): Uint8Array {
const key = x25519.utils.randomPrivateKey();
// scalar clamping for curve25519, according to
// https://www.rfc-editor.org/rfc/rfc7748#section-5
key[0] &= 248;
key[31] &= 127;
key[31] |= 64;

Loading…
Cancel
Save