Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1.15.0 #98

Merged
merged 58 commits into from
Oct 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
c2e9bfc
Rollups widget v1
GusevPM Sep 16, 2024
2ec9a30
Fix build
GusevPM Sep 16, 2024
2b286df
feat: leap wallet integration
xdeq Sep 18, 2024
3ef0c0e
Fix animation
GusevPM Sep 22, 2024
565647e
Add sorting
GusevPM Sep 22, 2024
f37c471
Dynamic bar width
GusevPM Sep 22, 2024
9642e3d
feat(connection): change wallet && terms&policy links
xdeq Sep 24, 2024
e583871
fix(Connect): badge overflow
xdeq Sep 24, 2024
1258288
Fix barWidth
GusevPM Sep 25, 2024
cd2fd3b
Fix active behavior
GusevPM Sep 26, 2024
af2d590
Fix widgets layout
GusevPM Sep 27, 2024
408a1af
Update metadata metric page
GusevPM Oct 3, 2024
a464e90
Change date picker colors
GusevPM Oct 3, 2024
3d9625b
Date picker refactoring
GusevPM Oct 3, 2024
953b0a7
Fix date picker mobile view
GusevPM Oct 4, 2024
d1ab8db
Add date picker on metric page
GusevPM Oct 4, 2024
b6f0edd
Add export to CSV and PNG
GusevPM Oct 5, 2024
3dbe340
Fix csv export
GusevPM Oct 6, 2024
899484f
Add fullscreen mode for charts
GusevPM Oct 8, 2024
42fed7f
Fix rollups links and change export periods
GusevPM Oct 8, 2024
be025a6
Merge pull request #94 from celenium-io/CLS-275-rollup-widget-view
GusevPM Oct 8, 2024
c8af994
Merge pull request #95 from celenium-io/CLS-274-improved-data-visuali…
GusevPM Oct 8, 2024
a55cea0
Merge branch 'dev' into leap
GusevPM Oct 8, 2024
7d58daa
Merge pull request #97 from celenium-io/leap
GusevPM Oct 8, 2024
e6731db
Fix config
GusevPM Oct 8, 2024
0c508ad
Fix png size when download
GusevPM Oct 9, 2024
e5feda6
Add amp for exports
GusevPM Oct 9, 2024
32da3ca
Fix amount input
GusevPM Oct 9, 2024
4e15de1
lumina node 0.5
xdeq Oct 16, 2024
1464eb3
upd lock file
xdeq Oct 16, 2024
b6f1ba5
fix wasm for workers
xdeq Oct 16, 2024
8dc1c6e
test
xdeq Oct 16, 2024
4a89613
test top level await
xdeq Oct 16, 2024
66f0492
trigger build with debug & sourcemap
xdeq Oct 16, 2024
c4413b6
disable minification
xdeq Oct 16, 2024
83107de
upd initCOnfig
xdeq Oct 16, 2024
022cf41
lumina plugin: client side
xdeq Oct 17, 2024
1826835
clean up
xdeq Oct 17, 2024
ace2fab
Add enums and categories for rollup widget
GusevPM Oct 17, 2024
83ad09c
Fix rollups widget, rework msgtypes, disable leap wallet for testnets
GusevPM Oct 17, 2024
99fbaaf
Fix pie charts
GusevPM Oct 18, 2024
3102f2a
Fix pie charts v2
GusevPM Oct 18, 2024
cadb4d4
Logs
GusevPM Oct 18, 2024
5fc526c
Try to fix v1
GusevPM Oct 18, 2024
199b71e
Try to fix v2
GusevPM Oct 18, 2024
3999acd
Remove logs
GusevPM Oct 18, 2024
9c48c81
fix
xdeq Oct 19, 2024
510dbe0
test
xdeq Oct 19, 2024
6cf5181
localhost wss arabica
xdeq Oct 19, 2024
6b4c9bc
rm log
xdeq Oct 19, 2024
6d0b210
Merge branch 'dev' into leap
GusevPM Oct 19, 2024
bb94051
Merge pull request #99 from celenium-io/leap
GusevPM Oct 19, 2024
855b9c1
mrg
xdeq Oct 19, 2024
fcb4373
Merge pull request #100 from celenium-io/lumina-upd
xdeq Oct 19, 2024
00820aa
Add categories and status badges
GusevPM Oct 20, 2024
4f69216
Fix config and category displaying
GusevPM Oct 20, 2024
86b998b
Clear comments
GusevPM Oct 20, 2024
cc7599f
Merge branch 'master' into dev
GusevPM Oct 21, 2024
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
5 changes: 5 additions & 0 deletions app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,13 @@ import { useNodeStore } from "@/store/node"
import { useAppStore } from "@/store/app"
import { useBookmarksStore } from "@/store/bookmarks"
import { useSettingsStore } from "@/store/settings"
import { useEnumStore } from "@/store/enums"
const nodeStore = useNodeStore()
const appStore = useAppStore()
const bookmarksStore = useBookmarksStore()
const settingsStore = useSettingsStore()
const enumStore = useEnumStore()

bookmarksStore.$subscribe((mutation, state) => {
localStorage.setItem("bookmarks", JSON.stringify(state.bookmarks))
})
Expand Down Expand Up @@ -52,6 +55,8 @@ onMounted(async () => {
const gasPrice = await fetchGasPrice()
appStore.gas = gasPrice

await enumStore.init()

window.onbeforeunload = function () {
Socket.close()
}
Expand Down
2 changes: 2 additions & 0 deletions assets/icons.json
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,8 @@
"arrow-circle-right-up": "M 4.222 19.778 C 8.518 24.074 15.482 24.074 19.778 19.778 C 24.074 15.482 24.074 8.518 19.778 4.222 C 15.482 -0.074 8.518 -0.074 4.222 4.222 C -0.074 8.518 -0.074 15.482 4.222 19.778 Z M 8.464 15.536 C 8.276 15.348 8.171 15.094 8.171 14.829 C 8.171 14.563 8.276 14.309 8.464 14.121 L 12.414 10.171 L 9.172 10.171 C 8.62 10.171 8.172 9.723 8.172 9.171 C 8.172 8.619 8.62 8.171 9.172 8.171 L 14.828 8.171 C 15.38 8.171 15.828 8.619 15.828 9.171 L 15.828 14.828 C 15.828 15.38 15.38 15.828 14.828 15.828 C 14.276 15.828 13.828 15.38 13.828 14.828 L 13.828 11.586 L 9.878 15.536 C 9.488 15.926 8.854 15.926 8.464 15.536 Z",
"arrow-circle-right-down": "M4.22183 4.22183C-0.0739431 8.51759 -0.0739431 15.4824 4.22183 19.7782C8.51759 24.0739 15.4824 24.0739 19.7782 19.7782C24.0739 15.4824 24.0739 8.51759 19.7782 4.22183C15.4824 -0.0739431 8.51759 -0.0739431 4.22183 4.22183ZM8.46447 8.46447C8.85499 8.07394 9.48816 8.07394 9.87868 8.46447L13.8284 12.4142V9.17157C13.8284 8.61929 14.2761 8.17157 14.8284 8.17157C15.3807 8.17157 15.8284 8.61929 15.8284 9.17157V14.8284C15.8284 15.3807 15.3807 15.8284 14.8284 15.8284H9.17157C8.61929 15.8284 8.17157 15.3807 8.17157 14.8284C8.17157 14.2761 8.61929 13.8284 9.17157 13.8284H12.4142L8.46447 9.87868C8.07394 9.48816 8.07394 8.85499 8.46447 8.46447Z",
"arrow-redo-right": "M18.4,10.6C16.55,9 14.15,8 11.5,8C6.85,8 2.92,11.03 1.54,15.22L3.9,16C4.95,12.81 7.95,10.5 11.5,10.5C13.45,10.5 15.23,11.22 16.62,12.38L13,16H22V7L18.4,10.6Z",
"sort-asc": "M19 17H22L18 21L14 17H17V3H19M2 17H12V19H2M6 5V7H2V5M2 11H9V13H2V11Z",
"sort-desc": "M19 7H22L18 3L14 7H17V21H19M2 17H12V19H2M6 5V7H2V5M2 11H9V13H2V11Z",
"dots": "M7 12C7 12.5304 6.78929 13.0391 6.41421 13.4142C6.03914 13.7893 5.53043 14 5 14C4.46957 14 3.96086 13.7893 3.58579 13.4142C3.21071 13.0391 3 12.5304 3 12C3 11.4696 3.21071 10.9609 3.58579 10.5858C3.96086 10.2107 4.46957 10 5 10C5.53043 10 6.03914 10.2107 6.41421 10.5858C6.78929 10.9609 7 11.4696 7 12ZM14 12C14 12.5304 13.7893 13.0391 13.4142 13.4142C13.0391 13.7893 12.5304 14 12 14C11.4696 14 10.9609 13.7893 10.5858 13.4142C10.2107 13.0391 10 12.5304 10 12C10 11.4696 10.2107 10.9609 10.5858 10.5858C10.9609 10.2107 11.4696 10 12 10C12.5304 10 13.0391 10.2107 13.4142 10.5858C13.7893 10.9609 14 11.4696 14 12ZM21 12C21 12.5304 20.7893 13.0391 20.4142 13.4142C20.0391 13.7893 19.5304 14 19 14C18.4696 14 17.9609 13.7893 17.5858 13.4142C17.2107 13.0391 17 12.5304 17 12C17 11.4696 17.2107 10.9609 17.5858 10.5858C17.9609 10.2107 18.4696 10 19 10C19.5304 10 20.0391 10.2107 20.4142 10.5858C20.7893 10.9609 21 11.4696 21 12Z",
"logout": "M13.4139 3.58611C13.1911 3.3633 12.8639 3.1959 12.1581 3.10095C11.4234 3.00213 10.4423 3 9 3H8C6.55722 3 5.57589 3.00213 4.84104 3.10095C4.13503 3.1959 3.8079 3.36331 3.58511 3.58611C3.36305 3.80817 3.19574 4.13501 3.10085 4.84139C3.00212 5.57633 3 6.55776 3 8V16C3 17.4422 3.00212 18.4237 3.10085 19.1586C3.19568 19.8646 3.36285 20.1914 3.58471 20.4135L3.58511 20.4139C3.8086 20.6369 4.13614 20.8042 4.84143 20.8991C5.57615 20.9979 6.55721 21 8 21H9C10.4423 21 11.4234 20.9979 12.1581 20.8991C12.8639 20.8041 13.1911 20.6367 13.4139 20.4139C13.6103 20.2175 13.7611 19.9423 13.8595 19.4073C13.963 18.8439 13.992 18.0898 13.998 16.9945C14.0011 16.4422 14.4512 15.997 15.0035 16C15.5558 16.0031 16.001 16.4532 15.998 17.0055C15.992 18.0852 15.9665 19.0076 15.8265 19.7689C15.6814 20.5587 15.3997 21.2565 14.8281 21.8281C14.1719 22.4843 13.3526 22.7564 12.4247 22.8812C11.541 23.0001 10.4245 23 9.07059 23H9.07057H9H8H7.92935H7.92933C6.57499 23 5.45853 23.0001 4.57482 22.8812C3.64679 22.7564 2.82779 22.4843 2.1713 21.8285L2.17089 21.8281C1.51495 21.1722 1.24326 20.3525 1.11865 19.4249C0.999933 18.5411 0.999962 17.4245 0.999996 16.0705L1 16V8L0.999996 7.9295C0.999962 6.57553 0.999933 5.45887 1.11865 4.57511C1.24326 3.64749 1.51495 2.82784 2.17089 2.17189C2.8271 1.51569 3.64647 1.2436 4.57446 1.1188C5.45829 0.999936 6.575 0.999964 7.92937 0.999999H7.9294L8 1H9L9.07059 0.999999H9.07062C10.4245 0.999964 11.541 0.999936 12.4247 1.1188C13.3526 1.24361 14.1719 1.5157 14.8281 2.17189C15.3997 2.74352 15.6814 3.44131 15.8265 4.2311C15.9665 4.99239 15.992 5.91482 15.998 6.99448C16.001 7.54676 15.5558 7.99694 15.0035 7.99999C14.4512 8.00303 14.0011 7.55779 13.998 7.00552C13.992 5.91018 13.963 5.15612 13.8595 4.59266C13.7611 4.05769 13.6103 3.78248 13.4139 3.58611ZM17.8492 9.75926C17.4299 9.39984 17.3813 8.76854 17.7407 8.34921C18.1002 7.92988 18.7315 7.88132 19.1508 8.24074L22.6508 11.2407C22.8724 11.4307 23 11.7081 23 12C23 12.2919 22.8724 12.5693 22.6508 12.7593L19.1508 15.7593C18.7315 16.1187 18.1002 16.0701 17.7407 15.6508C17.3813 15.2315 17.4299 14.6002 17.8492 14.2407L19.2967 13H9C8.44771 13 8 12.5523 8 12C8 11.4477 8.44771 11 9 11H19.2967L17.8492 9.75926Z",
"stars": "M15 1C15.4138 1 15.7848 1.25483 15.9333 1.64102L17.112 4.70544C17.4124 5.48648 17.5068 5.71155 17.6359 5.89315C17.7654 6.07536 17.9246 6.23455 18.1069 6.36411C18.2884 6.49323 18.5135 6.58763 19.2946 6.88803L22.359 8.06665C22.7452 8.21519 23 8.58623 23 9C23 9.41377 22.7452 9.78481 22.359 9.93335L19.2946 11.112C18.5135 11.4124 18.2884 11.5068 18.1069 11.6359C17.9246 11.7655 17.7655 11.9246 17.6359 12.1069C17.5068 12.2884 17.4124 12.5135 17.112 13.2946L15.9333 16.359C15.7848 16.7452 15.4138 17 15 17C14.5862 17 14.2152 16.7452 14.0667 16.359L12.888 13.2946C12.5876 12.5135 12.4932 12.2884 12.3641 12.1069C12.2345 11.9246 12.0754 11.7655 11.8931 11.6359C11.7116 11.5068 11.4865 11.4124 10.7054 11.112L7.64102 9.93335C7.25483 9.78481 7 9.41377 7 9C7 8.58623 7.25483 8.21519 7.64102 8.06665L10.7054 6.88803C11.4865 6.58763 11.7116 6.49323 11.8931 6.36411C12.0754 6.23455 12.2345 6.07535 12.3641 5.89315C12.4932 5.71155 12.5876 5.48648 12.888 4.70544L14.0667 1.64102C14.2152 1.25483 14.5862 1 15 1ZM6.5 12C6.87877 12 7.22503 12.214 7.39443 12.5528L8.17889 14.1217C8.46137 14.6867 8.54745 14.8493 8.65204 14.9849C8.75695 15.121 8.87896 15.243 9.01506 15.348C9.15075 15.4525 9.31333 15.5386 9.8783 15.8211L11.4472 16.6056C11.786 16.775 12 17.1212 12 17.5C12 17.8788 11.786 18.225 11.4472 18.3944L9.8783 19.1789C9.31333 19.4614 9.15075 19.5475 9.01506 19.652C8.87896 19.757 8.75695 19.879 8.65204 20.0151C8.54745 20.1507 8.46137 20.3133 8.17889 20.8783L7.39443 22.4472C7.22504 22.786 6.87877 23 6.5 23C6.12123 23 5.77497 22.786 5.60557 22.4472L4.82111 20.8783C4.53863 20.3133 4.45255 20.1507 4.34796 20.0151C4.24305 19.879 4.12104 19.757 3.98494 19.652C3.84925 19.5475 3.68667 19.4614 3.1217 19.1789L1.55279 18.3944C1.214 18.225 1 17.8788 1 17.5C1 17.1212 1.214 16.775 1.55279 16.6056L3.1217 15.8211C3.68667 15.5386 3.84925 15.4525 3.98494 15.348C4.12104 15.243 4.24305 15.121 4.34796 14.9849C4.45255 14.8493 4.53863 14.6867 4.82111 14.1217L5.60557 12.5528C5.77496 12.214 6.12123 12 6.5 12Z",
Expand Down
Binary file added assets/logos/keplr.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/logos/leap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 4 additions & 19 deletions assets/workers/worker.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,7 @@
import init, { run_worker } from "@/services/lumina-node-wasm/index.js"
import { NodeWorker } from "@/services/lumina-node-wasm/lumina_node_wasm"

async function worker_main() {
let queued = []
if (typeof SharedWorkerGlobalScope !== "undefined" && self instanceof SharedWorkerGlobalScope) {
onconnect = (event) => {
queued.push(event)
}
} else {
onmessage = (event) => {
queued.push(event)
}
}
Error.stackTraceLimit = 99

await init()
await run_worker(queued)
}
const worker = new NodeWorker(self)

if (typeof WorkerGlobalScope !== "undefined" && self instanceof WorkerGlobalScope) {
Error.stackTraceLimit = 99
worker_main()
}
worker.run()
95 changes: 11 additions & 84 deletions components/Connection.vue
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
<script setup>
/** UI */
import Button from "@/components/ui/Button.vue"
import Spinner from "@/components/ui/Spinner.vue"
import Tooltip from "@/components/ui/Tooltip.vue"
import { Dropdown, DropdownItem, DropdownDivider } from "@/components/ui/Dropdown"
import { Dropdown, DropdownTitle, DropdownItem, DropdownDivider } from "@/components/ui/Dropdown"

/** Services */
import amp from "@/services/amp"
import { suggestChain, getAccounts, disconnect } from "@/services/keplr"
import { disconnect } from "~/services/wallet"
import { arabica, mocha, mainnet } from "@/services/chains"

/** API */
import { fetchAddressByHash } from "@/services/api/address"

/** Store */
import { useAppStore } from "@/store/app"
import { useModalsStore } from "@/store/modals"
Expand All @@ -23,14 +18,13 @@ const notificationsStore = useNotificationsStore()

const router = useRouter()

const isWalletAvailable = ref(false)
const isFetchingAccounts = ref(false)

const { hostname } = useRequestURL()

switch (hostname) {
case "celenium.io":
// case "dev.celenium.io":
// case "dev.celenium.io":
appStore.network = mainnet
break

Expand All @@ -44,58 +38,10 @@ switch (hostname) {
default:
appStore.network = arabica
break

}

const getBalance = async () => {
const key = await window.keplr.getKey(appStore.network.chainId)

if (key) {
const { data } = await fetchAddressByHash(key.bech32Address)

if (data.value?.balance) {
appStore.balance = parseFloat(data.value.balance.spendable / 1_000_000) || 0
}
}
}

onMounted(async () => {
isWalletAvailable.value = !!window.keplr
})

const handleConnect = async () => {
try {
await suggestChain(appStore.network)

isFetchingAccounts.value = true

const accounts = await getAccounts(appStore.network)
if (accounts.length) {
appStore.address = accounts[0].address
}

getBalance()

isFetchingAccounts.value = false

amp.log("connect")
} catch (error) {
amp.log("rejectConnect")

switch (error.message) {
case "Request rejected":
notificationsStore.create({
notification: {
type: "info",
icon: "close",
title: "Request rejected",
description: "You canceled the Keplr wallet request",
autoDestroy: true,
},
})
break
}
}
modalsStore.open("connect")
}

const handleCopy = (target) => {
Expand All @@ -111,6 +57,10 @@ const handleCopy = (target) => {
})
}

const handleChangeWallet = () => {
modalsStore.open("connect")
}

const handleDisconnect = () => {
disconnect()

Expand All @@ -131,32 +81,7 @@ const handleDisconnect = () => {
</script>

<template>
<Tooltip v-if="isFetchingAccounts" position="end">
<Button type="secondary" size="small" disabled>
<Spinner size="14" />
Fetching
</Button>

<template #content>
<Flex direction="column" align="end" gap="6">
<Text>Receiving your accounts </Text>
<Text color="tertiary" height="120" align="right" style="max-width: 200px">
It's stuck? Try disabling the connection through your wallet and refresh the page
</Text>
<Text color="tertiary" height="120" align="right" style="max-width: 200px">
Sometimes the wallet pop-up may hide behind the browser window
</Text>
</Flex>
</template>
</Tooltip>

<Tooltip v-else-if="!isWalletAvailable" position="end">
<Button type="white" size="mini" disabled> Connect </Button>

<template #content> Install Keplr Wallet before connection </template>
</Tooltip>

<Button v-else-if="!appStore.address" @click="handleConnect" type="white" size="mini"> Connect </Button>
<Button v-if="!appStore.address" @click="handleConnect" type="white" size="mini"> Connect </Button>

<Dropdown v-else>
<Button type="secondary" size="mini">
Expand All @@ -165,6 +90,7 @@ const handleDisconnect = () => {
</Button>

<template #popup>
<DropdownTitle style="text-transform: capitalize">{{ appStore.wallet }} Wallet</DropdownTitle>
<DropdownItem @click="modalsStore.open('send')">Send TIA</DropdownItem>
<DropdownItem @click="modalsStore.open('pfb')">Submit Blob</DropdownItem>
<DropdownDivider />
Expand All @@ -178,6 +104,7 @@ const handleDisconnect = () => {
<Text>Copy address</Text>
</DropdownItem>
<DropdownDivider />
<DropdownItem @click="handleChangeWallet">Change wallet</DropdownItem>
<DropdownItem @click="handleDisconnect">Disconnect</DropdownItem>
</template>
</Dropdown>
Expand Down
Loading
Loading