Skip to content

Commit

Permalink
Cannot use '' for denom. That causes GasPrice.fromString to fail (#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
johnqh authored Oct 18, 2023
1 parent 5ec0750 commit 84b1b86
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 52 deletions.
73 changes: 24 additions & 49 deletions v4-client-js/__native__/__ios__/v4-native-client.js

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions v4-client-js/examples/native_examples.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
connectWallet,
deposit,
getAccountBalances,
getOptimalNode,
getUserStats,
simulateDeposit,
simulateTransferNativeToken,
Expand All @@ -19,6 +20,17 @@ import { DYDX_TEST_ADDRESS, DYDX_TEST_MNEMONIC } from './constants';

async function test(): Promise<void> {
try {
const paramsInJson = `{
"endpointUrls":[
"https://dydx-testnet.nodefleet.org",
"https://test-dydx.kingnodes.com",
"https://dydx-rpc.liquify.com/api=8878132/dydx"
],
"chainId":"dydx-testnet-4"
}`;
const result = await getOptimalNode(paramsInJson);
console.log(result);

const wallet = await connectWallet(DYDX_TEST_MNEMONIC);
console.log(wallet);

Expand Down
2 changes: 1 addition & 1 deletion v4-client-js/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dydxprotocol/v4-client-js",
"version": "0.40.1",
"version": "0.40.2",
"description": "General client library for the new dYdX system (v4 decentralized)",
"main": "build/src/index.js",
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions v4-client-js/src/network_optimizer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ export class NetworkOptimizer {
return (await Promise.all(
endpointUrls.map((endpointUrl) => ValidatorClient.connect(
new ValidatorConfig(endpointUrl, chainId, {
CHAINTOKEN_DENOM: '',
CHAINTOKEN_DENOM: 'placeholder',
CHAINTOKEN_DECIMALS: 18,
USDC_DENOM: '',
USDC_DENOM: 'uusdc',
USDC_DECIMALS: 6,
}))
.catch((_) => undefined),
Expand Down

0 comments on commit 84b1b86

Please sign in to comment.