diff --git a/examples/toolshed/readme.md b/examples/toolshed/readme.md index bd4b2347..71d87b71 100644 --- a/examples/toolshed/readme.md +++ b/examples/toolshed/readme.md @@ -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 ``` diff --git a/examples/toolshed/src/components/KeypairConfig.tsx b/examples/toolshed/src/components/KeypairConfig.tsx index 42db6f27..fffb10d3 100644 --- a/examples/toolshed/src/components/KeypairConfig.tsx +++ b/examples/toolshed/src/components/KeypairConfig.tsx @@ -40,11 +40,14 @@ function KeypairConfig({ state, dispatch }: dispatchAndConsume) { let method = _account.importAccountFromPrivateKey if (mnemonicOrPk.match(' ')) { + // @ts-ignore if (!_account.importAccountFromMnemonic) return alert('This account cannot be imported from a mnemonic') + // @ts-ignore method = _account.importAccountFromMnemonic } try { + // @ts-ignore const account = await method(mnemonicOrPk) dispatch({ type: Actions.SET_ACCOUNT, diff --git a/examples/toolshed/src/components/WalletConfig.tsx b/examples/toolshed/src/components/WalletConfig.tsx index e58dfacb..cb21020a 100644 --- a/examples/toolshed/src/components/WalletConfig.tsx +++ b/examples/toolshed/src/components/WalletConfig.tsx @@ -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, diff --git a/packages/message/src/aggregate/impl.ts b/packages/message/src/aggregate/impl.ts index 2a7cc68f..38c2fbae 100644 --- a/packages/message/src/aggregate/impl.ts +++ b/packages/message/src/aggregate/impl.ts @@ -105,4 +105,4 @@ export class AggregateMessageClient { } } -export default AggregateMessage +export default AggregateMessageClient