Skip to content

Commit de59915

Browse files
committed
feat(connection): send & pfb in dropdown && mainnet
1 parent dfb96bd commit de59915

3 files changed

Lines changed: 62 additions & 3 deletions

File tree

components/Connection.vue

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,17 @@ import { Dropdown, DropdownItem, DropdownDivider } from "@/components/ui/Dropdow
77
88
/** Services */
99
import { suggestChain, getAccounts, disconnect } from "@/services/keplr"
10-
import { arabica, mocha } from "@/services/chains"
10+
import { arabica, mocha, mainnet } from "@/services/chains"
1111
1212
/** API */
1313
import { fetchAddressByHash } from "@/services/api/address"
1414
1515
/** Store */
1616
import { useAppStore } from "@/store/app"
17+
import { useModalsStore } from "@/store/modals"
1718
import { useNotificationsStore } from "@/store/notifications"
1819
const appStore = useAppStore()
20+
const modalsStore = useModalsStore()
1921
const notificationsStore = useNotificationsStore()
2022
2123
const router = useRouter()
@@ -27,10 +29,13 @@ const account = ref()
2729
const { hostname } = useRequestURL()
2830
2931
switch (hostname) {
32+
case "localhost":
3033
case "dev.celenium.io":
34+
appStore.network = mainnet
35+
break
36+
3137
case "arabica.celenium.io":
3238
case "celenium.io":
33-
case "localhost":
3439
appStore.network = arabica
3540
break
3641
@@ -154,6 +159,9 @@ const handleDisconnect = () => {
154159
</Button>
155160
156161
<template #popup>
162+
<DropdownItem @click="modalsStore.open('send')">Send TIA</DropdownItem>
163+
<DropdownItem @click="modalsStore.open('pfb')">Submit Blob</DropdownItem>
164+
<DropdownDivider />
157165
<DropdownItem @click="router.push(`/address/${appStore.address}`)">
158166
<Flex direction="column" gap="6">
159167
<Text>Open my address</Text>

components/modals/PayForBlobModal.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const props = defineProps({
2828
})
2929
3030
const namespace = ref("")
31-
const namespaceError = ref()
31+
const namespaceError = ref("")
3232
3333
const uploadInputRef = ref()
3434

services/chains.js

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,3 +86,54 @@ export const arabica = {
8686
coinGeckoId: "celestia",
8787
},
8888
}
89+
90+
export const mainnet = {
91+
bech32Config: {
92+
bech32PrefixAccAddr: "celestia",
93+
bech32PrefixAccPub: "celestiapub",
94+
bech32PrefixConsAddr: "celestiavalcons",
95+
bech32PrefixConsPub: "celestiavalconspub",
96+
bech32PrefixValAddr: "celestiavaloper",
97+
bech32PrefixValPub: "celestiavaloperpub",
98+
},
99+
bip44: {
100+
coinType: 118,
101+
},
102+
chainId: "celestia",
103+
chainName: "Celestia",
104+
chainSymbolImageUrl: "https://raw.githubusercontent.com/chainapsis/keplr-chain-registry/main/images/celestia/chain.png",
105+
currencies: [
106+
{
107+
coinDecimals: 6,
108+
coinDenom: "TIA",
109+
coinGeckoId: "celestia",
110+
coinMinimalDenom: "utia",
111+
coinImageUrl: "https://raw.githubusercontent.com/chainapsis/keplr-chain-registry/main/images/celestia/chain.png",
112+
},
113+
],
114+
features: [],
115+
feeCurrencies: [
116+
{
117+
coinDecimals: 6,
118+
coinDenom: "TIA",
119+
coinGeckoId: "celestia",
120+
coinMinimalDenom: "utia",
121+
coinImageUrl: "https://raw.githubusercontent.com/chainapsis/keplr-chain-registry/main/images/celestia/chain.png",
122+
gasPriceStep: {
123+
low: 0.01,
124+
average: 0.02,
125+
high: 0.1,
126+
},
127+
},
128+
],
129+
rpc: "https://rpc-celestia.keplr.app",
130+
rest: "https://lcd-celestia.keplr.app",
131+
stakeCurrency: {
132+
coinDecimals: 6,
133+
coinDenom: "TIA",
134+
coinGeckoId: "celestia",
135+
coinMinimalDenom: "utia",
136+
coinImageUrl: "https://raw.githubusercontent.com/chainapsis/keplr-chain-registry/main/images/celestia/utia.png",
137+
},
138+
walletUrlForStaking: "https://wallet.keplr.app/chains/celestia",
139+
}

0 commit comments

Comments
 (0)