update osmosis nodes to Rhino (#762)

This commit is contained in:
Bob van der Helm 2024-02-02 14:05:00 +01:00 committed by GitHub
parent 829451554b
commit 98ab2c635a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 6 additions and 4 deletions

View File

@ -13,4 +13,4 @@ CHARTING_LIBRARY_ACCESS_TOKEN=access_token
CHARTING_LIBRARY_REPOSITORY=github.com/tradingview/charting_library/
NEXT_PUBLIC_PYTH_API=https://mars.rpc.p2p.world/api
NEXT_PUBLIC_API_KEY=api_key

View File

@ -137,8 +137,8 @@ const Osmosis1: ChainConfig = {
},
},
endpoints: {
rpc: 'https://osmosis-node.marsprotocol.io/GGSFGSFGFG34/osmosis-rpc-front/',
rest: 'https://osmosis-node.marsprotocol.io/GGSFGSFGFG34/osmosis-lcd-front/',
rpc: 'https://osmosis-rpc.cosmos-apis.com?x-apikey=' + process.env.NEXT_PUBLIC_API_KEY,
rest: 'https://osmosis-rest.cosmos-apis.com/',
swap: 'https://app.osmosis.zone',
explorer: 'https://www.mintscan.io/osmosis/transactions/',
routes: 'https://sqs.osmosis.zone/router',

View File

@ -18,7 +18,9 @@ export default function useWalletBalances(address?: string) {
async function getWalletBalances(chainConfig: ChainConfig, address: string): Promise<Coin[]> {
const uri = '/cosmos/bank/v1beta1/balances/'
const response = await fetch(`${chainConfig.endpoints.rest}${uri}${address}`)
const response = await fetch(
`${chainConfig.endpoints.rest}${uri}${address}?x-apikey=${process.env.NEXT_PUBLIC_API_KEY}`,
)
if (response.ok) {
const data = await response.json()