-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add guide for the breaking changes for Iban and IpcProvider (#5899)
* add guide for `IpcProvider` * add migration guid for Iban * rearrange sidebar_position for iban guide * update and correct providers guides and give more samples * set the type for reconnectOptions at SocketProvider constructor * improve SocketProvider, WebSocketProvider and IpcProvider constructor types * few edits at providers guides
- Loading branch information
1 parent
0a8a8ae
commit ff36f73
Showing
12 changed files
with
401 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
sidebar_position: 9 | ||
sidebar_position: 10 | ||
sidebar_label: web3.*.net | ||
--- | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
docs/docs/guides/web3_migration_guide/personal_migration_guide.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
sidebar_position: 7 | ||
sidebar_position: 8 | ||
sidebar_label: web3.eth.personal | ||
--- | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
docs/docs/guides/web3_migration_guide/subscribe_migration_guide.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
sidebar_position: 8 | ||
sidebar_position: 9 | ||
sidebar_label: web3.eth.subscribe | ||
--- | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
--- | ||
sidebar_position: 7 | ||
sidebar_label: web3.eth.iban | ||
--- | ||
|
||
# web3.eth.iban Migration Guide | ||
|
||
## Breaking Changes | ||
|
||
### Iban class | ||
|
||
#### The Iban contractor | ||
|
||
##### In version 1.x | ||
|
||
It used to just accept the passed string without any check. | ||
|
||
##### In version 4.x | ||
|
||
If the provided string was not of either the length of a direct IBAN (34 or 35), or the length of an indirect IBAN (20), an Error will be thrown. The error will contain the message `'Invalid IBAN was provided'` | ||
|
||
#### Calling `toAddress` on an Iban that is not Direct | ||
|
||
##### In version 1.x | ||
|
||
It used to behave differently, if it was called on an instance of IBAN, from if it was called as a static method. However, this used to happen only if the provided address was not a Direct IBAN. More specifically, if the instance method `new Iban(address).toAddress()` was called, it will return an empty string (`''`) for that non Direct IBAN. And if the static method `Iban.toAddress(address)` was called, it used to throw an Error with the message `'IBAN is indirect and can\'t be converted'`, for that non Direct IBAN. | ||
|
||
##### In version 4.x | ||
|
||
If the provided IBAN was not a Direct one, an error will be thrown which contains the message: `'Iban is indirect and cannot be converted. Must be length of 34 or 35'`. And this behavior is now the same for the instance method `new Iban(address).toAddress()` and the static method `Iban.toAddress(address)`. | ||
|
||
#### Calling `fromAddress` on an invalid address | ||
|
||
##### In version 1.x | ||
|
||
If the provided IBAN was not a valid Ethereum Address, an error used be thrown which contains the message `'Provided address is not a valid address: '+ address`. | ||
|
||
##### In version 4.x | ||
|
||
If the provided IBAN was not a valid Ethereum Address, an error object will be thrown which contains the message: `'Invalid value given "${address}". Error: 'invalid ethereum address'` and the code `1005`. |
2 changes: 1 addition & 1 deletion
2
docs/docs/guides/web3_migration_guide/web3_utils_migration_guide.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
sidebar_position: 10 | ||
sidebar_position: 11 | ||
sidebar_label: web3.utils | ||
--- | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.