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

wallet.getNativeBalance() doesn't work #4

Open
sydneyitguy opened this issue Jun 21, 2024 · 0 comments
Open

wallet.getNativeBalance() doesn't work #4

sydneyitguy opened this issue Jun 21, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@sydneyitguy
Copy link
Member

await mintclub
    .network("base")
    .withPrivateKey(PRIVATE_KEY);
await mintclub.wallet.getNativeBalance();

returns

1 | import { getVersion } from './utils.js';
2 | export class BaseError extends Error {
3 |     constructor(shortMessage, args = {}) {
4 |         super();
            ^
HttpRequestError: HTTP request failed.

URL: https://eth1.lava.build/lava-referer-16223de7-12c0-49f3-8d87-e5f1e6a0eb3b
Request body: {"method":"eth_requestAccounts"}

Details: JSON Parse error: Unrecognized token '<'
Version: viem@2.15.1
 url: "https://eth1.lava.build/lava-referer-16223de7-12c0-49f3-8d87-e5f1e6a0eb3b"

      at new BaseError (./node_modules/viem/_esm/errors/base.js:4:9)
      at new HttpRequestError (./node_modules/viem/_esm/errors/request.js:6:9)
      at ./node_modules/viem/_esm/utils/rpc/http.js:71:23

Bun v1.1.8 (macOS arm64)

If I just call the getBalance from the publicClient, it works fine

const publicClient = await mintclub.network("base").getPublicClient();
await publicClient.getBalance({ address: account });
@sydneyitguy sydneyitguy added the bug Something isn't working label Jun 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

2 participants