Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve code examples + snippets #81

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Conversation

denalimarsh
Copy link
Contributor

Updates transfer example and adds snippets for creating, claiming, and refunding a bep3 swap on Kava.

@denalimarsh denalimarsh added the R4R Request for review label Jan 7, 2022
Copy link
Contributor

@thomasmost thomasmost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I run npx ts-node example/transfer.ts I get

Error: mnemonic cannot be undefined
    at KavaClient.setWallet (/Users/thomas/kava/javascript-sdk/src/client/index.ts:145:13)
    at /Users/thomas/kava/javascript-sdk/example/transfer.ts:14:14
    at step (/Users/thomas/kava/javascript-sdk/example/transfer.ts:33:23)
    at Object.next (/Users/thomas/kava/javascript-sdk/example/transfer.ts:14:53)
    at /Users/thomas/kava/javascript-sdk/example/transfer.ts:8:71
    at new Promise (<anonymous>)
    at __awaiter (/Users/thomas/kava/javascript-sdk/example/transfer.ts:4:12)
    at main (/Users/thomas/kava/javascript-sdk/example/transfer.ts:9:12)
    at Object.<anonymous> (/Users/thomas/kava/javascript-sdk/example/transfer.ts:44:1)

Can you add to the README steps for properly running the examples? I feel like I must be missing something

@fwiessner
Copy link
Contributor

kavaClient.setWallet(Env.KavaDeputy.Local.Mnemonic);

and

let acc = await kavaClient.getAccount(Env.KavaDeputy.Local.Address);

is wrong - must be Env.KavaAccount.Local.Mnemonic and Env.KavaAccount.Local.Address !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
R4R Request for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants