Skip to content

Commit

Permalink
fixed eslint errors
Browse files Browse the repository at this point in the history
removed unused console.logs
  • Loading branch information
seeden committed Jan 19, 2022
1 parent b434cc2 commit d8a1e25
Show file tree
Hide file tree
Showing 126 changed files with 2,220 additions and 2,120 deletions.
3 changes: 2 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ daemon
build
*_old
packages/*/src/tests
packages/*/test/fixtures
packages/*/test/fixtures
packages/wallet/*
20 changes: 11 additions & 9 deletions packages/api-react/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,18 @@
This library provides react hooks on the top of @chia/api and uses [RTK Query](https://redux-toolkit.js.org/rtk-query/overview) under do hood.
It is designed to simplify common cases for loading data in a web application, eliminating the need to hand-write data fetching & caching logic yourself. Providing much more benefits:

- Automatically refresh queries when data changed (using events from Chia Blockchain).
- Tracking loading state in order to show UI spinners.
- Avoiding duplicate requests for the same data.
- Optimistic updates to make the UI feel faster.
- Managing cache lifetimes as the user interacts with the UI.
- Ability to use it without React library
- Support for polling and parallel queries
- Automatically refresh queries when data changed (using events from Chia Blockchain).
- Tracking loading state in order to show UI spinners.
- Avoiding duplicate requests for the same data.
- Optimistic updates to make the UI feel faster.
- Managing cache lifetimes as the user interacts with the UI.
- Ability to use it without React library
- Support for polling and parallel queries

## Query Example

#### **`PublicKeys.tsx`**
### **`PublicKeys.tsx`**

```tsx
import React from 'react';
import { useGetPublicKeysQuery } from '@chia/api-react';
Expand Down Expand Up @@ -49,7 +50,8 @@ export default function PublicKeys() {
}
```

#### **`Application.tsx`**
### **`Application.tsx`**

```tsx
import React, { Suspense } from 'react';
import Websocket from 'ws'; // or read this value from electron main application
Expand Down
14 changes: 7 additions & 7 deletions packages/api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@

This library provides support for TypeScript/JavaScript [Chia](https://www.chia.net) apps to access the [Chia Blockchain RPC](https://github.com/Chia-Network/chia-blockchain/wiki/RPC-Interfaces), by making it easier to perform the following actions:

- Making requests to the Chia Blockchain RPC.
- Catch responses and errors with standard try/catch and async/await syntax.
- Catch error when the request has a timeout. Each request has a default timeout of 10 minutes.
- Auto-connect to daemon when you send the first request.
- Auto-reconnect when the connection was disconnected.
- Transforming request/response and using standard [camel case](https://en.wikipedia.org/wiki/Camel_case) format for properties and responses. Internally will be everything converted to [snake case](https://en.wikipedia.org/wiki/Snake_case).
- Providing types for requests and responses.
- Making requests to the Chia Blockchain RPC.
- Catch responses and errors with standard try/catch and async/await syntax.
- Catch error when the request has a timeout. Each request has a default timeout of 10 minutes.
- Auto-connect to daemon when you send the first request.
- Auto-reconnect when the connection was disconnected.
- Transforming request/response and using standard [camel case](https://en.wikipedia.org/wiki/Camel_case) format for properties and responses. Internally will be everything converted to [snake case](https://en.wikipedia.org/wiki/Snake_case).
- Providing types for requests and responses.

## Example

Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/components/Settings/Settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export default function Settings(props: SettingsProps) {
return (
<>
<Tooltip title={<Trans>Settings</Trans>}>
<IconButton color="inherit" onClick={handleOpen}>
<IconButton color="inherit" onClick={handleOpen} disableFocusRipple>
<SettingsIcon />
</IconButton>
</Tooltip>
Expand Down
2 changes: 0 additions & 2 deletions packages/gui/src/electron/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,6 @@ if (!handleSquirrelEvent()) {
slashes: true,
});

console.log('startUrl', startUrl);

mainWindow.loadURL(startUrl);
require("@electron/remote/main").enable(mainWindow.webContents)

Expand Down
2 changes: 1 addition & 1 deletion packages/gui/src/locales/ar-SA/messages.js

Large diffs are not rendered by default.

Loading

0 comments on commit d8a1e25

Please sign in to comment.