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

Cannot use Balance and Swap component on localhost. #32

Open
lukema95 opened this issue Dec 27, 2024 · 4 comments
Open

Cannot use Balance and Swap component on localhost. #32

lukema95 opened this issue Dec 27, 2024 · 4 comments

Comments

@lukema95
Copy link

I use Universalkit's Swap and Balance components in template:

const Page = () => {
  return (
    <div className="m-4">
      <div className="flex justify-end gap-2 mb-10">
        <ConnectBitcoin />
        <ConnectButton label="Connect EVM" showBalance={false} />
      </div>
      <div className="flex justify-center">
        <div className="w-[400px]">
          <Swap contract={contract} />
          <Balances />
        </div>
      </div>
    </div>
  );
};

Fontend:
image

Got error:
image
image

I used "@zetachain/universalkit": "^2.0.0.

@fadeev
Copy link
Member

fadeev commented Dec 27, 2024

Yes, these components weren't built with localnet in mind, because they make queries to other chains.

@lukema95
Copy link
Author

Yes, these components weren't built with localnet in mind, because they make queries to other chains.

I'm connected to a test network. I just started the service locally. This appears to be a CORS issue causing the API access request to be denied

@lukema95
Copy link
Author

Yes, these components weren't built with localnet in mind, because they make queries to other chains.

I'm connected to a test network. I just started the service locally. This appears to be a CORS issue causing the API access request to be denied

@fadeev After I replaced the rpc of blockpi, it can work normally. I guess blockpi has some limitations at present, so we can consider not using it as the default rpc

@fadeev
Copy link
Member

fadeev commented Jan 6, 2025

@lukema95 yes, I've been having issues with BlockPi lately, too.

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

No branches or pull requests

2 participants