Skip to content

Commit

Permalink
Fix toolshed example & improve readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
MHHukiewitz committed Mar 11, 2024
1 parent b25cec4 commit b33b5e8
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 7 deletions.
14 changes: 10 additions & 4 deletions examples/toolshed/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,18 @@ This tool is intended as a quick demo to send message on the Aleph.im network us

## Setup

```
You must install all the dependencies from the typescript sdk at the root of the project before running it
You must install all the dependencies from the typescript sdk at the root of the project before running it.

```shell
# assumes you are in the root of the project
npm install && npm build

# now we can go to the toolshed example
cd examples/toolshed

# install dependencies
# install its dependencies
npm install

# Launches the app in your default browser
# and run the example
npm run dev
```
3 changes: 3 additions & 0 deletions examples/toolshed/src/components/KeypairConfig.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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

View workflow job for this annotation

GitHub Actions / lint

Use "@ts-expect-error" instead of "@ts-ignore", as "@ts-ignore" will do nothing if the following line is error-free
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

View workflow job for this annotation

GitHub Actions / lint

Use "@ts-expect-error" instead of "@ts-ignore", as "@ts-ignore" will do nothing if the following line is error-free
method = _account.importAccountFromMnemonic
}
try {
// @ts-ignore

Check failure on line 50 in examples/toolshed/src/components/KeypairConfig.tsx

View workflow job for this annotation

GitHub Actions / lint

Use "@ts-expect-error" instead of "@ts-ignore", as "@ts-ignore" will do nothing if the following line is error-free
const account = await method(mnemonicOrPk)
dispatch({
type: Actions.SET_ACCOUNT,
Expand Down
4 changes: 2 additions & 2 deletions examples/toolshed/src/components/WalletConfig.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ function WalletConfig({ dispatch, state }: dispatchAndConsume) {
try {
const account =
state.selectedChain === WalletChains.Ethereum
? await _account.GetAccountFromProvider(provider, customEndpoint)
: await _account.GetAccountFromProvider(provider)
? await _account.getAccountFromProvider(provider, customEndpoint)
: await _account.getAccountFromProvider(provider)
dispatch({
type: Actions.SET_ACCOUNT,
payload: account,
Expand Down
2 changes: 1 addition & 1 deletion packages/message/src/aggregate/impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,4 +105,4 @@ export class AggregateMessageClient {
}
}

export default AggregateMessage
export default AggregateMessageClient

0 comments on commit b33b5e8

Please sign in to comment.