Skip to content

Commit e4c658c

Browse files
authored
Merge pull request #103 from celenium-io/dev
Hot fix rollups category displaying and Leap wallet
2 parents 7e0e27c + 8c319e4 commit e4c658c

File tree

9 files changed

+4770
-6763
lines changed

9 files changed

+4770
-6763
lines changed

assets/logos/leap.png

1.52 KB
Loading

components/Connection.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ const notificationsStore = useNotificationsStore()
1818
1919
const router = useRouter()
2020
21-
const isFetchingAccounts = ref(false)
22-
2321
const { hostname } = useRequestURL()
2422
2523
switch (hostname) {

components/cmd/CommandMenu.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ const rawQuickCommandsActions = [
316316
icon: "coins",
317317
title: "Send TIA",
318318
subtitle: "Command",
319-
runText: "Send via Keplr",
319+
runText: "Send TIA",
320320
321321
callback: () => {
322322
modalsStore.open("send")
@@ -327,7 +327,7 @@ const rawQuickCommandsActions = [
327327
icon: "blob",
328328
title: "Submit data blob",
329329
subtitle: "Command",
330-
runText: "Submit via Keplr",
330+
runText: "Submit blob",
331331
332332
callback: () => {
333333
modalsStore.open("pfb")

components/modals/PayForBlobModal.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ watch(
7575
amp.log("showPfbModal")
7676
7777
if (!appStore.address?.length) {
78-
warningBannerText.value = "Keplr wallet connection is required to submit a blob."
78+
warningBannerText.value = "Wallet connection is required to submit a blob."
7979
} else if (hostname !== "celenium.io") {
8080
warningBannerText.value = `You are currently on ${hostname}. The transaction will be performed on the test network.`
8181
} else {

components/modals/SendModal.vue

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ watch(
163163
164164
const calcGasFee = (target) => {
165165
const gasLimit = typeof estimatedGasLimit.value === "number" ? estimatedGasLimit.value : estimatedGasLimit.value.replaceAll(" ", "")
166-
return comma((gasLimit * appStore.gas[target.toLowerCase()]).toFixed(2))
166+
return comma(((selectedGasLimit.value === 'Custom' ? Number.parseInt(customGasLimit.value.toString().replaceAll(" ", "")) : gasLimit) * appStore.gas[target.toLowerCase()]).toFixed(2))
167167
}
168168
169169
const runGasLimitEstimation = async () => {
@@ -202,7 +202,7 @@ watch(
202202
amp.log("showSendModal")
203203
204204
if (!appStore.address?.length) {
205-
warningBannerText.value = "Keplr wallet connection is required to send TIA."
205+
warningBannerText.value = "Wallet connection is required to send TIA."
206206
} else if (hostname !== "celenium.io") {
207207
warningBannerText.value = `You are currently on ${hostname}. The transaction will be performed on the test network.`
208208
} else {
@@ -245,7 +245,7 @@ const continueButton = computed(() => {
245245
}
246246
}
247247
248-
if (parseFloat(amount.value) === 0) {
248+
if (parseFloat(amount.value) === 0 || isNaN(parseFloat(amount.value))) {
249249
return {
250250
title: "Enter the amount",
251251
disable: true,
@@ -481,8 +481,8 @@ const handleContinue = async () => {
481481
placeholder="0.00"
482482
/>
483483
484-
<Flex direction="column" gap="12" style="opacity: 0.3; pointer-events: none">
485-
<Flex direction="column" gap="8">
484+
<Flex direction="column" gap="12">
485+
<Flex direction="column" gap="8" :style="appStore.wallet !== 'leap' && { pointerEvents: 'none', opacity: 0.3 }">
486486
<Text size="12" weight="600" color="secondary">Gas Fees</Text>
487487
488488
<Flex align="center" justify="between" gap="12">
@@ -531,7 +531,7 @@ const handleContinue = async () => {
531531
</Flex>
532532
</Flex>
533533
534-
<Flex gap="6">
534+
<Flex v-if="appStore.wallet === 'keplr'" gap="6">
535535
<Icon name="info" size="12" color="tertiary" style="margin-top: 1px" />
536536
<Text size="12" weight="500" height="140" color="tertiary">
537537
Keplr does not currently support receiving a Gas Fee from outside.<br />

components/modals/StakingModal.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ watch(
202202
amp.log("showStakingModal")
203203
204204
if (!appStore.address?.length) {
205-
warningBannerText.value = "Keplr wallet connection is required to delegate."
205+
warningBannerText.value = "Wallet connection is required to delegate."
206206
} else if (hostname !== "celenium.io") {
207207
warningBannerText.value = `You are currently on ${hostname}. The transaction will be performed on the test network.`
208208
} else {
@@ -526,7 +526,7 @@ const handleContinue = async () => {
526526
</Flex>
527527
</Flex>
528528
529-
<Flex gap="6">
529+
<Flex v-if="appStore.wallet === 'keplr'" gap="6">
530530
<Icon name="info" size="12" color="tertiary" style="margin-top: 1px" />
531531
<Text size="12" weight="500" height="140" color="tertiary">
532532
Keplr does not currently support receiving a Gas Fee from outside.<br />

pages/rollups.vue

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,19 @@ const categories = computed(() => {
9595
9696
return res
9797
})
98+
const getCategoryDisplayName = (category) => {
99+
switch (category) {
100+
case 'nft':
101+
return 'NFT'
102+
103+
case 'uncategorized':
104+
return 'Other'
105+
106+
default:
107+
return capitilize(category)
108+
}
109+
}
110+
98111
const filters = reactive({
99112
categories: categories.value?.reduce((a, b) => ({ ...a, [b]: false }), {}),
100113
})
@@ -279,7 +292,7 @@ watch(
279292
<Text size="12" weight="600" color="primary" style="text-transform: capitalize">
280293
{{ Object.keys(filters.categories)
281294
.filter((c) => filters.categories[c])
282-
.map(c => c === 'nft' ? c.toUpperCase() : capitilize(c))
295+
.map(c => getCategoryDisplayName(c))
283296
.join(", ")
284297
}}
285298
</Text>
@@ -298,7 +311,7 @@ watch(
298311
v-model="filters.categories[c]"
299312
>
300313
<Text size="12" weight="500" color="primary">
301-
{{ c === 'nft' ? c.toUpperCase() : capitilize(c) }}
314+
{{ getCategoryDisplayName(c) }}
302315
</Text>
303316
</Checkbox>
304317
</Flex>
@@ -417,7 +430,7 @@ watch(
417430
<td>
418431
<NuxtLink :to="`/rollup/${r.slug}`">
419432
<Flex align="center">
420-
<Text size="13" weight="600" color="primary"> {{ r.category === 'nft' ? r.category.toUpperCase() : capitilize(r.category) }} </Text>
433+
<Text size="13" weight="600" color="primary"> {{ getCategoryDisplayName(r.category) }} </Text>
421434
</Flex>
422435
</NuxtLink>
423436
</td>

pages/widgets/rollups.vue

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,19 @@ const categories = computed(() => {
9191
})
9292
const selectedCategories = ref([])
9393
94+
const getCategoryDisplayName = (category) => {
95+
switch (category) {
96+
case 'nft':
97+
return 'NFT'
98+
99+
case 'uncategorized':
100+
return 'Other'
101+
102+
default:
103+
return capitilize(category)
104+
}
105+
}
106+
94107
const handleSelectCategory = (category) => {
95108
if (selectedCategories.value.includes(category)) {
96109
selectedCategories.value = selectedCategories.value.filter(c => c !== category)
@@ -232,7 +245,7 @@ watch(
232245
:class="[$style.chip, selectedCategories.includes(c) && $style.active]"
233246
>
234247
<Flex align="center" :class="$style.content">
235-
<Text size="12" weight="600" color="primary"> {{ c === 'nft' ? c.toUpperCase() : capitilize(c) }} </Text>
248+
<Text size="12" weight="600" color="primary"> {{ getCategoryDisplayName(c) }} </Text>
236249
</Flex>
237250
</Flex>
238251
@@ -346,12 +359,7 @@ watch(
346359
<Flex align="center" :class="$style.chip" :style="{ borderRadius: '8px' }">
347360
<Flex align="center" :class="$style.content" :style="{ padding: '4px 8px' }">
348361
<Text size="12" color="tertiary">
349-
{{ r.category === 'nft'
350-
? r.category.toUpperCase()
351-
: r.category === 'uncategorized'
352-
? 'Other'
353-
: capitilize(r.category)
354-
}}
362+
{{ getCategoryDisplayName(r.category) }}
355363
</Text>
356364
</Flex>
357365
</Flex>

0 commit comments

Comments
 (0)