Skip to content

Commit dd6b187

Browse files
authored
Merge pull request #115 from celenium-io/faucet
Faucet
2 parents 922e0fb + 374d43d commit dd6b187

File tree

12 files changed

+1077
-355
lines changed

12 files changed

+1077
-355
lines changed

assets/icons.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,5 +201,7 @@
201201
"line-chart": "M3.5,18.5L9.5,12.5L13.5,16.5L22,6.92L20.59,5.5L13.5,13.5L9.5,9.5L2,17L3.5,18.5Z",
202202
"bar-chart": "M3,22V8H7V22H3M10,22V2H14V22H10M17,22V14H21V22H17Z",
203203
"gantt-chart": "M2,5H10V2H12V22H10V18H6V15H10V13H4V10H10V8H2V5M14,5H17V8H14V5M14,10H19V13H14V10M14,15H22V18H14V15Z",
204-
"crown": "M5 16L3 5L8.5 10L12 4L15.5 10L21 5L19 16H5M19 19C19 19.6 18.6 20 18 20H6C5.4 20 5 19.6 5 19V18H19V19Z"
204+
"crown": "M5 16L3 5L8.5 10L12 4L15.5 10L21 5L19 16H5M19 19C19 19.6 18.6 20 18 20H6C5.4 20 5 19.6 5 19V18H19V19Z",
205+
"drop": "M12 18C12 18.7 12.12 19.36 12.34 20C12.23 20 12.12 20 12 20C8.69 20 6 17.31 6 14C6 10 12 3.25 12 3.25S16.31 8.1 17.62 12C16.93 12.06 16.28 12.22 15.67 12.47C15 10.68 13.5 8.33 12 6.39C10 8.96 8 12.23 8 14C8 16.21 9.79 18 12 18M19 17V14H17V17H14V19H17V22H19V19H22V17H19Z",
206+
"faucet": "M21 21H3C3 19.9 3.9 19 5 19H19C20.11 19 21 19.89 21 21M19 7C19 5.39 17.93 3 15 3S11 5.39 11 7V18H13V7C13 6.54 13.17 5 15 5S17 6.54 17 7H16.5V9H19.5V7H19M7 12C6.45 12 6 12.45 6 13V14H3V15H6V18H8V13C8 12.45 7.55 12 7 12M21 14H18V13C18 12.45 17.55 12 17 12S16 12.45 16 13V18H18V15H21V14Z"
205207
}

components/LeftSidebar.vue

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,11 @@ const modularLinks = reactive([
127127
128128
const isToolsLinkCollapsed = ref(false)
129129
const toolsLinks = reactive([
130+
{
131+
icon: "drop",
132+
name: "Faucet",
133+
path: "/faucet",
134+
},
130135
{
131136
icon: "blob",
132137
name: "Blobstream",
@@ -351,9 +356,9 @@ const handleNavigate = (url) => {
351356
352357
.group_title {
353358
border-radius: 5px;
354-
cursor: default;
359+
cursor: pointer;
355360
356-
padding: 4px 6px;
361+
padding: 6px 6px;
357362
margin: 0 2px;
358363
359364
transition: all 0.2s ease;

components/cmd/CommandMenu.vue

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,15 @@ const rawNavigationActions = [
291291
router.push("/calculators/savings")
292292
},
293293
},
294+
{
295+
type: "callback",
296+
icon: "arrow-narrow-right",
297+
title: "Go to Faucet",
298+
runText: "Open Faucet",
299+
callback: () => {
300+
router.push("/faucet")
301+
},
302+
},
294303
{
295304
type: "callback",
296305
icon: "arrow-narrow-right",

components/modals/SendModal.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import Button from "@/components/ui/Button.vue"
1010
1111
/** API */
1212
import { search } from "@/services/api/search"
13-
import { fetchAddressByHash } from "@/services/api/address"
1413
1514
/** Services */
1615
import amp from "@/services/amp"

components/modals/StakingModal.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ watch(
210210
}
211211
212212
if (cacheStore.current.validator) {
213-
address.value = cacheStore.current.validator.address
213+
address.value = cacheStore.current.validator.address?.hash
214214
}
215215
216216
nextTick(() => {

components/shared/AdvBanner.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,15 @@ const props = defineProps({
1717
},
1818
})
1919
20+
const router = useRouter()
21+
2022
const adv = ref({})
2123
const isDisplayed = ref(true)
2224
2325
const handleClick = () => {
24-
if (adv.value.link) {
26+
if (adv.value.internalLink) {
27+
router.push(adv.value.internalLink)
28+
} else if (adv.value.link) {
2529
window.open(adv.value.link, '_blank')
2630
} else if (adv.value.modal) {
2731
modalsStore.open(adv.value.modal)

components/widgets/StakingWidget.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ const wrapperEl = ref(null)
2020
const wrapperWidth = ref(0)
2121
const barWidth = computed(() => Math.round(wrapperWidth.value - 32))
2222
23-
const totalSupply = computed(() => lastHead.value.total_supply / 1_000_000)
23+
const totalSupply = computed(() => lastHead.value?.total_supply / 1_000_000)
2424
const totalSupplyUSD = computed(() => totalSupply.value * currentPrice.value?.close)
25-
const totalVotingPower = computed(() => lastHead.value.total_voting_power)
25+
const totalVotingPower = computed(() => lastHead.value?.total_voting_power)
2626
const totalVotingPowerUSD = computed(() => totalVotingPower.value * currentPrice.value?.close)
2727
28-
const bondedShare = computed(() => shareOfTotal(lastHead?.value.total_voting_power * 1_000_000, lastHead?.value.total_supply, 2))
28+
const bondedShare = computed(() => shareOfTotal(lastHead.value?.total_voting_power * 1_000_000, lastHead.value?.total_supply, 2))
2929
3030
const isRefetching = ref(true)
3131
const totalValidators = ref(0)
@@ -51,7 +51,7 @@ const validatorsGraph = ref([
5151
},
5252
])
5353
54-
const getValidatorsStats = async () => {
54+
const fetchValidatorsStats = async () => {
5555
isRefetching.value = true
5656
5757
const { data } = await fetchValidatorsCount()

0 commit comments

Comments
 (0)