Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ts/web-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"prettier:write": "prettier --write ."
},
"dependencies": {
"@cosmjs/cosmwasm-stargate": "^0.28.4",
"@cosmjs/cosmwasm-stargate": "^0.32.4",
"daisyui": "^2.14.3",
"js-sha256": "^0.9.0",
"next": "12.1.6",
Expand Down
46 changes: 20 additions & 26 deletions ts/web-app/services/keplr.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,6 @@ export const connectKeplr = async () => {
rpc: process.env.NEXT_PUBLIC_CHAIN_RPC_ENDPOINT,
// REST endpoint of the chain.
rest: process.env.NEXT_PUBLIC_CHAIN_REST_ENDPOINT,
// Staking coin information
stakeCurrency: {
// Coin denomination to be displayed to the user.
coinDenom: stakingDenom,
// Actual denom (i.e. uatom, uscrt) used by the blockchain.
coinMinimalDenom: process.env.NEXT_PUBLIC_STAKING_DENOM,
// # of decimal points to convert minimal denomination to user-facing denomination.
coinDecimals: 6,
// (Optional) Keplr can show the fiat value of the coin if a coingecko id is provided.
// You can get id from https://api.coingecko.com/api/v3/coins/list if it is listed.
// coinGeckoId: ""
},
// (Optional) If you have a wallet webpage used to stake the coin then provide the url to the website in `walletUrlForStaking`.
// The 'stake' button in Keplr extension will link to the webpage.
// walletUrlForStaking: "",
Expand Down Expand Up @@ -91,25 +79,31 @@ export const connectKeplr = async () => {
coinMinimalDenom: process.env.NEXT_PUBLIC_STAKING_DENOM,
// # of decimal points to convert minimal denomination to user-facing denomination.
coinDecimals: 6,
// (Optional) This is used to set the fee of the transaction.
// If this field is not provided, Keplr extension will set the default gas price as (low: 0.01, average: 0.025, high: 0.04).
// Currently, Keplr doesn't support dynamic calculation of the gas prices based on on-chain data.
// Make sure that the gas prices are higher than the minimum gas prices accepted by chain validators and RPC/REST endpoint.
gasPriceStep: {
low: gasPrice,
average: gasPrice,
high: gasPrice,
},
// (Optional) Keplr can show the fiat value of the coin if a coingecko id is provided.
// You can get id from https://api.coingecko.com/api/v3/coins/list if it is listed.
// coinGeckoId: ""
},
],
// (Optional) The number of the coin type.
// This field is only used to fetch the address from ENS.
// Ideally, it is recommended to be the same with BIP44 path's coin type.
// However, some early chains may choose to use the Cosmos Hub BIP44 path of '118'.
// So, this is separated to support such chains.
coinType: Number(process.env.NEXT_PUBLIC_CHAIN_COIN_TYPE),
// (Optional) This is used to set the fee of the transaction.
// If this field is not provided, Keplr extension will set the default gas price as (low: 0.01, average: 0.025, high: 0.04).
// Currently, Keplr doesn't support dynamic calculation of the gas prices based on on-chain data.
// Make sure that the gas prices are higher than the minimum gas prices accepted by chain validators and RPC/REST endpoint.
gasPriceStep: {
low: gasPrice,
average: gasPrice,
high: gasPrice,
// Staking coin information
stakeCurrency: {
// Coin denomination to be displayed to the user.
coinDenom: stakingDenom,
// Actual denom (i.e. uatom, uscrt) used by the blockchain.
coinMinimalDenom: process.env.NEXT_PUBLIC_STAKING_DENOM,
// # of decimal points to convert minimal denomination to user-facing denomination.
coinDecimals: 6,
// (Optional) Keplr can show the fiat value of the coin if a coingecko id is provided.
// You can get id from https://api.coingecko.com/api/v3/coins/list if it is listed.
// coinGeckoId: ""
},
})
} catch {
Expand Down
Loading