* Take gas limit and fees from user * Update text input ui * Use gasPrice from networks data * Use default gas limit from env * Use default gas price if not found in registry * Remove appended denom in gas price * Use gas limit from env * Show error dialog when transaction fails * Calculate gas limit and gas price if not received from dapp * Update example env * Improve syntax --------- Co-authored-by: IshaVenikar <ishavenikar7@gmail.com>
35 lines
971 B
TypeScript
35 lines
971 B
TypeScript
import { COSMOS_TESTNET_CHAINS } from './wallet-connect/COSMOSData';
|
|
import { EIP155_CHAINS } from './wallet-connect/EIP155Data';
|
|
|
|
export const EIP155 = 'eip155';
|
|
export const COSMOS = 'cosmos';
|
|
export const DEFAULT_NETWORKS = [
|
|
{
|
|
chainId: '1',
|
|
networkName: EIP155_CHAINS['eip155:1'].name,
|
|
namespace: EIP155,
|
|
rpcUrl: EIP155_CHAINS['eip155:1'].rpc,
|
|
blockExplorerUrl: '',
|
|
currencySymbol: 'ETH',
|
|
coinType: '60',
|
|
isDefault: true,
|
|
},
|
|
{
|
|
chainId: 'theta-testnet-001',
|
|
networkName: COSMOS_TESTNET_CHAINS['cosmos:theta-testnet-001'].name,
|
|
namespace: COSMOS,
|
|
rpcUrl: COSMOS_TESTNET_CHAINS['cosmos:theta-testnet-001'].rpc,
|
|
blockExplorerUrl: '',
|
|
nativeDenom: 'uatom',
|
|
addressPrefix: 'cosmos',
|
|
coinType: '118',
|
|
gasPrice: '0.025',
|
|
isDefault: true,
|
|
},
|
|
];
|
|
|
|
export const CHAINID_DEBOUNCE_DELAY = 250;
|
|
|
|
export const EMPTY_FIELD_ERROR = 'Field cannot be empty';
|
|
export const INVALID_URL_ERROR = 'Invalid URL';
|