diff --git a/index.html b/index.html index db5db691..24f0bbaf 100644 --- a/index.html +++ b/index.html @@ -11,10 +11,6 @@ name="description" content="OraiScan Dashboard is a block explorer/web wallet for blockchains built on Cosmos SDK, Cosmoshub, Osmosis, Juno, Evmos, Injective, Canto and 70+ blockchains listed on ping.pub" /> - diff --git a/package.json b/package.json index 943b1f98..717021fd 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,7 @@ "@intlify/unplugin-vue-i18n": "^0.8.2", "@leapwallet/cosmos-snap-provider": "^0.1.20", "@leapwallet/name-matcha": "^1.1.0", + "@oraichain/oraiscan-widget": "^0.2.11", "@osmonauts/lcd": "^0.8.0", "@ping-pub/chain-registry-client": "^0.0.25", "@vitejs/plugin-vue-jsx": "^3.0.0", diff --git a/public/test.html b/public/test.html index 6b46c576..1d385c57 100644 --- a/public/test.html +++ b/public/test.html @@ -1,17 +1,27 @@ - - Widget Test - - - + + Widget Test + + +
-
- -
-
+
+ +
+
- + +
-
- - \ No newline at end of file + + diff --git a/src/main.ts b/src/main.ts index f0d9b263..9be320d7 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,4 +1,4 @@ -// import 'ping-widget'; +import '@oraichain/oraiscan-widget'; import App from '@/App.vue'; import i18n from '@/plugins/i18n'; import '@/style.css'; diff --git a/src/modules/[chain]/widget/index.vue b/src/modules/[chain]/widget/index.vue index 804b3e53..c392cb28 100644 --- a/src/modules/[chain]/widget/index.vue +++ b/src/modules/[chain]/widget/index.vue @@ -7,48 +7,65 @@ import { ref } from 'vue'; const props = defineProps(['chain']); const chainStore = useBlockchain(); -const baseStore = useBaseStore() -const endpoint = ref(chainStore.current?.endpoints?.rest?.at(0)?.address) +const baseStore = useBaseStore(); +const endpoint = ref(chainStore.current?.endpoints?.rpc?.at(0)?.address); -const chainId = computed(() => baseStore.latest?.block?.header?.chain_id || "") -const chainName = computed(() => chainStore?.current?.prettyName || "") +const chainId = computed(() => baseStore.latest?.block?.header?.chainId || ''); +const chainName = computed(() => chainStore?.current?.prettyName || ''); const hdPath = computed(() => { - return `m/44'/${ chainStore.current?.coinType }/0'/0/0` -}) + return `m/44'/${chainStore.current?.coinType}/0'/0/0`; +});