mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-12-21 03:15:28 -05:00
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:
parent
3ce8e360c5
commit
5948a40c8d
45 changed files with 312 additions and 648 deletions
|
|
@ -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}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue