Skip to content

Commit

Permalink
📦 VERSION: 2.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
riverrun46 committed Feb 22, 2024
1 parent 8751c91 commit d0d04dd
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 31 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
"buffer": "^6.0.3",
"check-password-strength": "^2.0.7",
"create-hash": "^1.2.0",
"crypto": "^1.0.1",
"crypto-js": "^4.1.1",
"dayjs": "^1.11.7",
"decimal.js": "^10.4.3",
Expand All @@ -54,6 +53,7 @@
"mvc-std-lib": "^1.1.4",
"object-hash": "^3.0.0",
"qrcode": "^1.5.3",
"randombytes": "^2.1.0",
"vue": "^3.2.45",
"vue-router": "^4.1.6"
},
Expand All @@ -64,6 +64,7 @@
"@types/crypto-js": "^4.1.1",
"@types/node": "^18.15.10",
"@types/object-hash": "^3.0.2",
"@types/randombytes": "^2.0.3",
"@types/webextension-polyfill": "^0.10.0",
"@vitejs/plugin-vue": "^4.0.0",
"@vitest/ui": "^0.34.2",
Expand Down
2 changes: 1 addition & 1 deletion src/lib/actions/btc/inscribe.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { randomBytes } from 'crypto'
import randomBytes from 'randombytes'
import { sleep } from '@/lib/helpers'
import * as bitcoin from './bitcoinjs-lib'
import { getBtcUtxos } from '@/queries/utxos'
Expand Down
2 changes: 1 addition & 1 deletion src/lib/actions/btc/psbtSign.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {isP2SHScript, isP2TR} from "./bitcoinjs-lib/psbt/psbtutils";
import * as bscript from "./bitcoinjs-lib/script";
import {sha256} from "./bitcoinjs-lib/crypto";
import {range} from "./bitcoinjs-lib/bip174/converter/tools";
import {pbkdf2Sync, randomBytes} from "crypto";
import randomBytes from 'randombytes'

const schnorr = signUtil.schnorr.secp256k1.schnorr
const defaultMaximumFeeRate = 5000
Expand Down
46 changes: 24 additions & 22 deletions src/pages/nfts/Index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,11 @@ import SpaceLogoImg from '@/assets/images/space-logo.svg?url'
import { getCurrentAccount, type Account } from '@/lib/account'
import MvcCollectionPanel from './components/MvcCollectionPanel.vue'
import { TabGroup, TabList, Tab, TabPanels, TabPanel } from '@headlessui/vue'
import {
Listbox,
ListboxButton,
ListboxOptions,
ListboxOption,
} from '@headlessui/vue'
import { Listbox, ListboxButton, ListboxOptions, ListboxOption } from '@headlessui/vue'
import { Squares2X2Icon } from '@heroicons/vue/24/outline'
import { ChevronDownIcon, CheckIcon } from '@heroicons/vue/24/solid'
const nfts = [
{ id: 1, name: 'Ordinals', disabled: false },
// { id: 2, name: 'Atomicals', disabled: true },
Expand Down Expand Up @@ -54,20 +48,28 @@ function changeTab(index: number) {
<AccountItem :account="account" :current-account="account" v-if="account" :show-network="true" class="mb-4 -mt-4" />

<div class="relative">
<div :class="['absolute right-0 z-10', selectedTab === 1 ? '' : 'hidden']">
<div :class="['absolute right-0 z-10', selectedTab === 0 ? '' : 'hidden']">
<Listbox v-model="selectedNFT">
<ListboxButton class="flex items-center gap-x-1.5 border-2 rounded-xl py-1.5 px-[18px] ml-auto">
<Squares2X2Icon class="w-5 h-5" />
<span>{{ selectedNFT.name }}</span>
<ChevronDownIcon class="w-3 h-3" />
</ListboxButton>
<ListboxOptions class="p-[18px] bg-white rounded-xl select-box-shadow space-y-5 w-[184px]">
<ListboxOption v-for="nft in nfts" :key="nft.id" :value="nft"
<ListboxOption
v-for="nft in nfts"
:key="nft.id"
:value="nft"
:class="[!nft.disabled ? 'cursor-pointer' : 'cursor-not-allowed', 'flex items-center']"
:disabled="nft.disabled">
:disabled="nft.disabled"
>
<span>{{ nft.name }}</span>
<div
:class="['w-5 h-5 flex items-center justify-center bg-[#1E2BFF] rounded ml-auto', selectedNFT.id !== nft.id ? 'hidden' : '']">
:class="[
'w-5 h-5 flex items-center justify-center bg-[#1E2BFF] rounded ml-auto',
selectedNFT.id !== nft.id ? 'hidden' : '',
]"
>
<CheckIcon class="text-white w-2.5" />
</div>
</ListboxOption>
Expand All @@ -77,17 +79,17 @@ function changeTab(index: number) {

<TabGroup :selectedIndex="selectedTab" @change="changeTab">
<TabList>
<Tab :class="['tab1', selectedTab === 0 ? 'active' : '']">
<!-- <Tab :class="['tab1', selectedTab === 0 ? 'active' : '']">
<span>Crypto</span>
</Tab>
<Tab :class="['tab1', selectedTab === 1 ? 'active' : '']">
</Tab> -->
<Tab :class="['tab1', selectedTab === 0 ? 'active' : '']">
<span>NFTs</span>
</Tab>
</TabList>
<TabPanels class="mt-8">
<TabPanel>
<!-- <TabPanel>
<div class="text-[#909399] mt-[58px] text-center">No collectibles yet</div>
</TabPanel>
</TabPanel> -->
<TabPanel>
<MvcCollectionPanel v-if="selectedNFT.name === 'MetaContract'" />
<BRCTokenList v-else-if="selectedNFT.name === 'Ordinals'" />
Expand Down Expand Up @@ -125,29 +127,29 @@ function changeTab(index: number) {
@apply flex flex-1 items-center justify-center gap-2 rounded-inherit py-2 text-sm font-bold focus:outline-none focus:ring-0 ui-selected:bg-btn-blue ui-selected:text-blue-50;
}
.tab>img {
.tab > img {
@apply h-6 w-6 rounded-full bg-white p-1;
}
.tab>img:nth-child(1) {
.tab > img:nth-child(1) {
@apply p-0;
}
.tab1 {
padding: 10px 8px;
}
.tab1>span {
.tab1 > span {
color: #999999;
font-weight: bold;
}
.tab1.active>span {
color: #1E2BFF;
.tab1.active > span {
color: #1e2bff;
}
.tab1.active {
border-bottom: 2px solid #1E2BFF;
border-bottom: 2px solid #1e2bff;
}
.select-box-shadow {
Expand Down
1 change: 0 additions & 1 deletion src/pages/wallet/Index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ getCurrentAccount().then((acc) => {
:current-account="currentAccount"
/>

<button>test</button>

<Balance />

Expand Down
12 changes: 7 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -845,6 +845,13 @@
resolved "https://registry.yarnpkg.com/@types/object-hash/-/object-hash-3.0.6.tgz#25c052428199d374ef723b7b0ed44b5bfe1b3029"
integrity sha512-fOBV8C1FIu2ELinoILQ+ApxcUKz4ngq+IWUYrxSGjXzzjUALijilampwkMgEtJ+h2njAW3pi853QpzNVCHB73w==

"@types/randombytes@^2.0.3":
version "2.0.3"
resolved "https://registry.yarnpkg.com/@types/randombytes/-/randombytes-2.0.3.tgz#c83a107ef51ae7a8611a7b964f54b21cb782bbed"
integrity sha512-+NRgihTfuURllWCiIAhm1wsJqzsocnqXM77V/CalsdJIYSRGEHMnritxh+6EsBklshC+clo1KgnN14qgSGeQdw==
dependencies:
"@types/node" "*"

"@types/web-bluetooth@^0.0.20":
version "0.0.20"
resolved "https://registry.yarnpkg.com/@types/web-bluetooth/-/web-bluetooth-0.0.20.tgz#f066abfcd1cbe66267cdbbf0de010d8a41b41597"
Expand Down Expand Up @@ -1822,11 +1829,6 @@ crypto-js@^4.1.1:
resolved "https://registry.yarnpkg.com/crypto-js/-/crypto-js-4.2.0.tgz#4d931639ecdfd12ff80e8186dba6af2c2e856631"
integrity sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q==

crypto@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/crypto/-/crypto-1.0.1.tgz#2af1b7cad8175d24c8a1b0778255794a21803037"
integrity sha512-VxBKmeNcqQdiUQUW2Tzq0t377b54N2bMtXO/qiLa+6eRRmmC4qT3D4OnTGoT/U6O9aklQ/jTwbOtRMTTY8G0Ig==

css-select@^5.1.0:
version "5.1.0"
resolved "https://registry.yarnpkg.com/css-select/-/css-select-5.1.0.tgz#b8ebd6554c3637ccc76688804ad3f6a6fdaea8a6"
Expand Down

0 comments on commit d0d04dd

Please sign in to comment.