fix(gui): Strictly enforce UI types with Typescript (#678)

* fix(gui): we were not checking for null everywhere

* add more null checks, enable tsconfig strict

* remove dead code

* more nullish checks

* remove unused JSONViewTree.tsx

* fix a bunch of small typescript lints

* add explanations as to why LabeledMoneroAddress.address is non-nullish but we pass in null due to typeshare limitation

* remove @mui/lab from yarn.lock

* re-add SortableQuoteWithAddress

* add guard function for ExportBitcoinWalletResponseExt ("wallet_descriptor")

* fix remaining linter errors

* remove duplicate XMR

* fix hasUnusualAmountOfTimePassed in SwapStatusAlert.tsx
This commit is contained in:
Mohan 2025-11-05 18:38:00 +01:00 committed by GitHub
parent 3ce8e360c5
commit 5948a40c8d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
45 changed files with 312 additions and 648 deletions

View file

@ -432,7 +432,7 @@ function MoneroNodeUrlSetting() {
<Box sx={{ display: "flex", alignItems: "center", gap: 1 }}>
<ValidatedTextField
value={moneroNodeUrl}
onValidatedChange={handleNodeUrlChange}
onValidatedChange={(value) => value && handleNodeUrlChange(value)}
placeholder={PLACEHOLDER_MONERO_NODE_URL}
disabled={useMoneroRpcPool}
fullWidth
@ -675,7 +675,7 @@ function NodeTable({
<ValidatedTextField
label="Add a new node"
value={newNode}
onValidatedChange={setNewNode}
onValidatedChange={(value) => setNewNode(value ?? "")}
placeholder={placeholder}
fullWidth
isValid={isValid}
@ -843,7 +843,9 @@ function RendezvousPointsSetting() {
<ValidatedTextField
label="Add new rendezvous point"
value={newPoint}
onValidatedChange={setNewPoint}
onValidatedChange={(value) =>
setNewPoint(value ?? "")
}
placeholder="/dns4/rendezvous.observer/tcp/8888/p2p/12D3KooWMjceGXrYuGuDMGrfmJxALnSDbK4km6s1i1sJEgDTgGQa"
fullWidth
isValid={isValidMultiAddressWithPeerId}