Skip to content

Commit

Permalink
chore: replace our endpoint with ankr's
Browse files Browse the repository at this point in the history
  • Loading branch information
ashuralyk committed Dec 15, 2024
1 parent 046929a commit 427fbb9
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
15 changes: 9 additions & 6 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion src/cores/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,15 @@ export interface WalletConfig extends ChainConfig {

let WalletConfig: WalletConfig | undefined = undefined;

const chain2RpcUrl = Object.freeze({
mainnet: "https://mainnet.ckb.dev",
testnet: "https://testnet.ckb.dev",
devnet: "http://127.0.0.1:8114/",
});

export async function setupWalletConfig(signer: ccc.Signer,queryClient: QueryClient) {
const chain = signer.client.addressPrefix === "ckb" ? "mainnet" : "testnet";
const chainConfig = await chainConfigFrom(chain, undefined, true, getIckbScriptConfigs);
const chainConfig = await chainConfigFrom(chain, chain2RpcUrl[chain], true, getIckbScriptConfigs);
const addresses = await signer.getAddressObjs();
let signerAddress = addresses[0];
for (const address of addresses) {
Expand Down

0 comments on commit 427fbb9

Please sign in to comment.