This repository has been archived by the owner on Jan 24, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 201
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Remove unused sendDataTransaction and related methods * Remove syncTimeout property from contracts * Set web3 transactionPollingTimeout with value from timeout option * Add new blockTimeout option used in websocket connections * Lint * Apply suggestions from code review Co-Authored-By: Nicolás Venturo <[email protected]> Co-authored-by: Nicolás Venturo <[email protected]>
- Loading branch information
1 parent
e8a5fb4
commit 4efd4cc
Showing
16 changed files
with
76 additions
and
361 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,17 @@ | ||
import Session from '../models/network/Session'; | ||
import { SessionParams } from './interfaces'; | ||
|
||
export default function session({ network, from, timeout, close = false, expires }: SessionParams): void | never { | ||
const anyNetworkOption = network || from || timeout; | ||
export default function session({ | ||
network, | ||
from, | ||
timeout, | ||
blockTimeout, | ||
close = false, | ||
expires, | ||
}: SessionParams): void | never { | ||
const anyNetworkOption = network || from || timeout || blockTimeout; | ||
if (!!anyNetworkOption === !!close) { | ||
throw Error('Please provide either a network option (--network, --timeout, --from) or --close.'); | ||
throw Error('Please provide either a network option (--network, --timeout, --blockTimeout, --from) or --close.'); | ||
} | ||
close ? Session.close() : Session.open({ network, from, timeout }, expires); | ||
close ? Session.close() : Session.open({ network, from, timeout, blockTimeout }, expires); | ||
} |
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
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.