Skip to content

Commit

Permalink
Merge pull request #67 from leapwallet/add-celestia-and-dydx
Browse files Browse the repository at this point in the history
Added celestia and dydx Chains and fixed build issues
  • Loading branch information
leapsamvel authored Oct 31, 2023
2 parents 9d386e9 + 479b6d3 commit bcc5099
Show file tree
Hide file tree
Showing 6 changed files with 64 additions and 11 deletions.
24 changes: 24 additions & 0 deletions packages/cosmos-snap-provider/src/constants/chainInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,18 @@ const Chains = {
denom: 'uc4e',
decimals: 6,
},
celestia: {
chainId: 'celestia',
chainName: 'Celestia',
bech32Config: {
bech32PrefixAccAddr: 'celestia',
},
bip44: {
coinType: 118,
},
denom: 'utia',
decimals: 6,
},
'cheqd-mainnet-1': {
chainId: 'cheqd-mainnet-1',
chainName: 'cheqd',
Expand Down Expand Up @@ -335,6 +347,18 @@ const Chains = {
denom: 'udig',
decimals: 6,
},
dydx: {
chainId: 'dydx-mainnet-1',
chainName: 'dYdX Protocol',
bech32Config: {
bech32PrefixAccAddr: 'dydx',
},
bip44: {
coinType: 118,
},
denom: 'DYDX',
decimals: 18,
},
'dyson-mainnet-01': {
chainId: 'dyson-mainnet-01',
chainName: 'dyson',
Expand Down
1 change: 1 addition & 0 deletions packages/cosmos-snap-provider/src/cosmjs-offline-signer.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* eslint jsdoc/match-description: 0 */ // --> OFF
/* eslint require-atomic-updates: 0 */ // --> OFF
/* eslint jsdoc/require-param: 0 */ // --> OFF

import { SignDoc } from 'cosmjs-types/cosmos/tx/v1beta1/tx';
import { AccountData, AminoSignResponse } from '@cosmjs/amino';
Expand Down
4 changes: 2 additions & 2 deletions packages/snap/snap.manifest.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"version": "0.1.16",
"version": "0.1.17",
"description": "Securely manage keys, connect to Cosmos dapps, and sign transactions.",
"proposedName": "Leap Cosmos Wallet",
"repository": {
"type": "git",
"url": "https://github.com/leapwallet/cosmos-metamask-snap.git"
},
"source": {
"shasum": "diCk3Ht/3Fhbn089viNkY9N6dr41wCMm1KR0wJhLzm0=",
"shasum": "CLwZocaUEbDErtQAsybaudZDJq65a8AwlEFgkGUpmAQ=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
20 changes: 20 additions & 0 deletions packages/snap/src/constants/chainInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,16 @@ const Chains = {
coinType: 4444,
},
},
celestia: {
chainId: 'celestia',
chainName: 'Celestia',
bech32Config: {
bech32PrefixAccAddr: 'celestia',
},
bip44: {
coinType: 118,
},
},
'cheqd-mainnet-1': {
chainId: 'cheqd-mainnet-1',
chainName: 'cheqd',
Expand Down Expand Up @@ -279,6 +289,16 @@ const Chains = {
coinType: 118,
},
},
dydx: {
chainId: 'dydx-mainnet-1',
chainName: 'dYdX Protocol',
bech32Config: {
bech32PrefixAccAddr: 'dydx',
},
bip44: {
coinType: '118',
},
},
'dyson-mainnet-01': {
chainId: 'dyson-mainnet-01',
chainName: 'dyson',
Expand Down
25 changes: 16 additions & 9 deletions packages/snap/src/constants/denoms.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,20 @@
const DENOMS = {
adydx: {
coinDenom: 'DYDX',
coinDecimals: 18,
coinMinimalDenom: 'adydx',
icon: 'https://assets.leapwallet.io/dydx.png',
chain: 'dydx',
coinGeckoId: 'dydx',
},
utia: {
coinDenom: 'TIA',
coinDecimals: 6,
coinMinimalDenom: 'utia',
icon: 'https://assets.leapwallet.io/filled-celestia.svg',
chain: 'celestia',
coinGeckoId: '',
},
umpwr: {
coinDenom: 'MPWR',
coinMinimalDenom: 'umpwr',
Expand Down Expand Up @@ -1837,15 +1853,6 @@ const DENOMS = {
chain: 'planq',
coinGeckoId: 'planq',
},
utia: {
name: 'Celestia',
coinDenom: 'TIA',
coinMinimalDenom: 'utia',
coinDecimals: 6,
icon: 'https://assets.leapwallet.io/celestia.png',
chain: 'celestiatestnet',
coinGeckoId: '',
},
juno168ctmpyppk90d34p3jjy658zf5a5l3w8wk35wht6ccqj4mr0yv8s4j5awr: {
name: 'Neta',
description: 'The native token cw20 for Neta on Juno Chain',
Expand Down
1 change: 1 addition & 0 deletions packages/snap/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint no-negated-condition: 0 */ // --> OFF
import { AminoMsg, StdFee } from '@cosmjs/amino';
import { OnRpcRequestHandler } from '@metamask/snaps-types';
import { panel } from '@metamask/snaps-ui';
Expand Down

0 comments on commit bcc5099

Please sign in to comment.