diff --git a/packages/nibijs/docs/classes/StableSwap.md b/packages/nibijs/docs/classes/StableSwap.md index 9c75aaa9..6eb6b352 100644 --- a/packages/nibijs/docs/classes/StableSwap.md +++ b/packages/nibijs/docs/classes/StableSwap.md @@ -178,8 +178,8 @@ y() Calculate x[j] if one makes x[i] = x Done by solving quadratic equation iteratively. -x_1**2 + x1 * (sum' - (A*n**n - 1) _ D / (A _ n**n)) = D ** (n+1)/(n ** (2 _ n) _ prod' \* A) -x_1**2 + b\*x_1 = c +x*1**2 + x1 * (sum' - (A*n**n - 1) * D / (A _ n**n)) = D ** (n+1)/(n \*\* (2 _ n) \_ prod' \* A) +x_1\*\*2 + b\*x_1 = c x_1 = (x_1\**2 + c) / (2*x_1 + b) diff --git a/packages/nibijs/src/chain/chain.ts b/packages/nibijs/src/chain/chain.ts index f4850560..34e652c8 100644 --- a/packages/nibijs/src/chain/chain.ts +++ b/packages/nibijs/src/chain/chain.ts @@ -112,9 +112,12 @@ export const Devnet = (chainNumber: number) => export const queryChainIdWithRest = async (chain: Chain) => { const queryChainId = async (chain: Chain): Promise => { - const response = await window.fetch(`${chain.endptRest}/node_info`) - const nodeInfo: { node_info: { network: string } } = await response.json() - return nodeInfo.node_info.network + const response = await window.fetch( + `${chain.endptRest}/cosmos/base/tendermint/v1beta1/node_info` + ) + const nodeInfo: { default_node_info: { network: string } } = + await response.json() + return nodeInfo.default_node_info.network } const { res: chainId, err } = await go(queryChainId(chain))