laconic-wallet/src/utils/constants.ts
shreerang6921 b1a0831e78 Take gas limit and fees values from user while approving transaction (#109)
* 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>
2024-04-25 17:08:27 +05:30

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';