Skip to content

Commit fabf972

Browse files
authored
Correct typos and refs errors in docs (#186)
1 parent 2ad799c commit fabf972

File tree

3 files changed

+24
-17
lines changed

3 files changed

+24
-17
lines changed

docs/source/conf.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
# -- Project information -----------------------------------------------------
1919

2020
project = 'usedapp'
21-
copyright = '2020 Ethworks sp z o.o.'
21+
copyright = '2021 Ethworks sp z o.o.'
2222
author = 'Ethworks team'
2323

2424

@@ -27,7 +27,10 @@
2727
# Add any Sphinx extension module names here, as strings. They can be
2828
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
2929
# ones.
30-
extensions = ['sphinx_tabs.tabs']
30+
extensions = [
31+
'sphinx_tabs.tabs',
32+
'sphinx.ext.autosectionlabel'
33+
]
3134

3235
# Add any paths that contain templates here, relative to this directory.
3336
templates_path = ['_templates']
@@ -50,4 +53,8 @@
5053
html_logo = '_static/logo-square.png'
5154
html_theme_options = {
5255
'logo_only': True,
53-
}
56+
}
57+
58+
# Allows for cross-refs without refs ambiguity, e.g. :ref:`core/hooks`
59+
# https://www.sphinx-doc.org/en/master/usage/extensions/autosectionlabel.html#configuration
60+
autosectionlabel_prefix_document = True

docs/source/core.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Provides basic services for a DApp. It combines the following components: ``<Con
1212

1313
*Properties:*
1414

15-
- ``config: Partial<Config>``: configuration of the Dapp, see `Config`_
15+
- ``config: Partial<Config>``: configuration of the DApp, see `Config`_
1616

1717
*Example:*
1818

@@ -171,7 +171,7 @@ This function is used for debouncing multicall until enough calls are aggregated
171171

172172
- ``first: T`` - first variable to be debounced
173173
- ``second: U`` - second variable to be debounced
174-
- ``delay: number`` - deboune time - amount of time in ms
174+
- ``delay: number`` - debounce time - amount of time in ms
175175

176176
**Returns**
177177

@@ -213,7 +213,7 @@ Returns connection state and functions that allow to manipulate the state.
213213
- ``chainId: ChainId`` - current chainId (or *undefined* if not connected)
214214
- ``library: Web3Provider`` - an instance of ethers `Web3Provider <https://github.com/EthWorks/useDapp/tree/master/packages/example>`_ (or *undefined* if not connected)
215215
- ``active: boolean`` - returns if provider is connected (read or write mode)
216-
- ``activateBrowserWallet()`` - function that will inititate connection to browser web3 extension (e.g. Metamask)
216+
- ``activateBrowserWallet()`` - function that will initiate connection to browser web3 extension (e.g. Metamask)
217217
- ``async activate(connector: AbstractConnector, onError?: (error: Error) => void, throwErrors?: boolean)`` - function that allows to connect to a wallet
218218
- ``async deactivate()`` - function that disconnects wallet
219219
- ``error?: Error`` - an error that occurred during connecting (e.g. connection is broken, unsupported network)
@@ -314,7 +314,7 @@ Mapping of ``ChainId``'s to node URLs to use in read-only mode.
314314
List of intended supported chains. If a user tries to connect to an unsupported chain an error value will be returned by `useEthers`.
315315

316316
**Default value:**
317-
``[ChainId.Mainnet, ChainId.Gorli, ChainId.Kovan, ChainId.Rinkeby, ChainId.Ropsten, ChainId.xDai]``
317+
``[ChainId.Mainnet, ChainId.Goerli, ChainId.Kovan, ChainId.Rinkeby, ChainId.Ropsten, ChainId.xDai]``
318318

319319
**pollingInterval**
320320
Polling interval for a new block.
@@ -406,7 +406,7 @@ ChainId
406406
Enum that represents chain ids.
407407

408408
**Values:**
409-
``Mainnet, Gorli, Kovan, Rinkeby, Ropsten, xDai``
409+
``Mainnet, Goerli, Kovan, Rinkeby, Ropsten, xDai``
410410

411411

412412
Helpers
@@ -498,7 +498,7 @@ Returns if a given chain is a testnet.
498498
shortenAddress
499499
==============
500500

501-
Returns short representation of address or throws an error if address is incorrent.
501+
Returns short representation of address or throws an error if address is incorrect.
502502

503503
**Parameters**
504504

@@ -514,13 +514,13 @@ Returns short representation of address or throws an error if address is incorre
514514
shortenAddress('6E9e7A8Fb61b0e1Bc3cB30e6c8E335046267D3A0')
515515
// 0x6E9e...D3A0
516516
517-
shortenAddress("i'm not an addres")
517+
shortenAddress("i'm not an address")
518518
// TypeError("Invalid input, address can't be parsed")
519519
520520
shortenIfAddress
521521
================
522522

523-
Returns short representation of address or throws an error if address is incorrent.
523+
Returns short representation of address or throws an error if address is incorrect.
524524
Returns empty string if no address is provided.
525525

526526
**Parameters**
@@ -540,7 +540,7 @@ Returns empty string if no address is provided.
540540
shortenIfAddress(undefined)
541541
// ''
542542
543-
shortenIfAddress("i'm not an addres")
543+
shortenIfAddress("i'm not an address")
544544
// TypeError("Invalid input, address can't be parsed")
545545
546546
compareAddress

docs/source/guide.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Connecting to network
66

77
Read-only
88
=========
9-
To connect to the network in read-only mode, provide ``readOnlyChainId`` and ``readOnlyUrls`` fileds in application configuration.
9+
To connect to the network in read-only mode, provide ``readOnlyChainId`` and ``readOnlyUrls`` fields in application configuration.
1010

1111
See example configuration below:
1212

@@ -24,7 +24,7 @@ Browser wallet
2424
==============
2525

2626
To connect to a wallet in a web3-enabled browser, use ``activateBrowserWallet`` returned by ``useEthers()``.
27-
Once connected ``account`` variable will be availabe.
27+
Once connected ``account`` variable will be available.
2828

2929
See example below:
3030

@@ -68,7 +68,7 @@ Example
6868
Example below demonstrates how to manage and use connection.
6969

7070
Application allow to see the balance of Ethereum 2.0 staking contracts in read-only mode.
71-
When wallet is connected additionaly it shows user's account along with it's balance.
71+
When wallet is connected additionally it shows user's account along with it's balance.
7272

7373
Example is available `here <https://example.usedapp.io/balance>`_.
7474

@@ -169,10 +169,10 @@ Another example is useTokenAllowance hook. Instead of balanceOf, we use allowanc
169169
The *useContractCall* hook will take care of updating the balance of new blocks.
170170
The results are deferred so that the hook does not update too frequently.
171171
172-
In our custom hooks we can use any standard react hooks, custom react hooks and useDApp hooks.
172+
In our custom hooks we can use any standard react hooks, custom react hooks and useDapp hooks.
173173
Rules of hooks apply.
174174
175-
Documentation for hooks is available `here <file:///Users/marek/Projects/useDapp/docs/dist/html/core.html#hooks>`_.
175+
Documentation for hooks is available :ref:`here <core:Hooks>`.
176176
177177
178178
Using hooks considerations

0 commit comments

Comments
 (0)