-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix toolshed example & improve readme.md
- Loading branch information
1 parent
b25cec4
commit b33b5e8
Showing
4 changed files
with
16 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,11 +40,14 @@ function KeypairConfig({ state, dispatch }: dispatchAndConsume) { | |
let method = _account.importAccountFromPrivateKey | ||
|
||
if (mnemonicOrPk.match(' ')) { | ||
// @ts-ignore | ||
Check failure on line 43 in examples/toolshed/src/components/KeypairConfig.tsx GitHub Actions / lint
|
||
if (!_account.importAccountFromMnemonic) return alert('This account cannot be imported from a mnemonic') | ||
|
||
// @ts-ignore | ||
Check failure on line 46 in examples/toolshed/src/components/KeypairConfig.tsx GitHub Actions / lint
|
||
method = _account.importAccountFromMnemonic | ||
} | ||
try { | ||
// @ts-ignore | ||
Check failure on line 50 in examples/toolshed/src/components/KeypairConfig.tsx GitHub Actions / lint
|
||
const account = await method(mnemonicOrPk) | ||
dispatch({ | ||
type: Actions.SET_ACCOUNT, | ||
|
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