Skip to content

Commit

Permalink
♻️ Split signing rpc into separated config for nft rpc
Browse files Browse the repository at this point in the history
  • Loading branch information
williamchong committed Jul 20, 2022
1 parent adfe728 commit cc8e83b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions config/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ config.COSMOS_CHAIN_ID = 'likecoin-public-testnet-5';
config.ISCN_DEV_LCD_ENDPOINT = 'localhost:1317';
config.ISCN_DEV_CHAIN_ID = 'iscn-dev-chain';
config.COSMOS_DENOM = 'nanoekil';
config.NFT_RPC_ENDPOINT = 'https://node.testnet.like.co';
config.NFT_SIGNING_RPC_ENDPOINT = 'https://node.testnet.like.co';
config.NFT_CHAIN_ID = 'likecoin-public-testnet-5';
config.NFT_COSMOS_DENOM = 'nanoekil';

config.ARWEAVE_LIKE_TARGET_ADDRESS = '';
config.IPFS_ENDPOINT = 'https://ipfs.infura.io:5001/api/v0';
Expand Down
4 changes: 2 additions & 2 deletions src/util/cosmos/nft.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { PageRequest } from 'cosmjs-types/cosmos/base/query/v1beta1/pagination';
import { getQueryClient } from '.';
import { getISCNPrefix } from './iscn';
import { LIKER_NFT_PRIVATE_KEY } from '../../../config/secret';
import { NFT_RPC_ENDPOINT } from '../../../config/config';
import { NFT_RPC_ENDPOINT, NFT_SIGNING_RPC_ENDPOINT } from '../../../config/config';

let queryClient = null;
let signingClient = null;
Expand Down Expand Up @@ -35,7 +35,7 @@ export async function createNFTSigningClient(privateKey) {
const signer = await DirectSecp256k1Wallet.fromKey(privateKeyBytes, 'like');
const [wallet] = await signer.getAccounts();
const client = new ISCNSigningClient();
await client.connectWithSigner(NFT_RPC_ENDPOINT, signer);
await client.connectWithSigner(NFT_SIGNING_RPC_ENDPOINT, signer);
return { client, wallet };
}

Expand Down

0 comments on commit cc8e83b

Please sign in to comment.