cec Claim

This commit is contained in:
yuyongdong 2024-08-22 14:28:10 +08:00
parent 25335b5abf
commit 6e6f84b474
6 changed files with 23 additions and 5 deletions

View File

@ -2,6 +2,7 @@ import { PassportWallet } from "@/components/chain/wallet/PassportWallet";
import { MetaMaskWallet } from '@/components/chain/wallet/MetaMaskWallet'; import { MetaMaskWallet } from '@/components/chain/wallet/MetaMaskWallet';
import { OkxWallet } from '@/components/chain/wallet/OkxWallet'; import { OkxWallet } from '@/components/chain/wallet/OkxWallet';
import { BitgetWallet } from '@/components/chain/wallet/BitgetWallet'; import { BitgetWallet } from '@/components/chain/wallet/BitgetWallet';
import { FireWallet } from '@/components/chain/wallet/FireWallet';
import { walletStore } from "@/store/wallet"; import { walletStore } from "@/store/wallet";
import WalletSelectModel from "@/components/chain/WalletSelectModel.vue"; import WalletSelectModel from "@/components/chain/WalletSelectModel.vue";
import {createModal} from "@/utils/model.util"; import {createModal} from "@/utils/model.util";
@ -18,7 +19,8 @@ export const allProviders = {
1: MetaMaskWallet, 1: MetaMaskWallet,
2: OkxWallet, 2: OkxWallet,
3: PassportWallet, 3: PassportWallet,
4: BitgetWallet 4: BitgetWallet,
5: FireWallet
} }
export class BlockChain { export class BlockChain {
@ -124,8 +126,14 @@ export class BlockChain {
} }
// claim CEC 登录 // claim CEC 登录
async cecLogin () { async cecLogin (title, subTitle) {
const rewardModal = createModal(WalletSelectModel, {}); const rewardModal = createModal(WalletSelectModel, {
title: title || 'Select Address',
message: subTitle || 'Please select the address you want to use',
subTitle: subTitle,
initData: {},
disabled: []
});
} }
/** /**

View File

@ -46,6 +46,7 @@ const props = defineProps({
}); });
const currentDatas = computed(() => { const currentDatas = computed(() => {
// debugger
let list = ALL_PROVIDERS.map((item) => { let list = ALL_PROVIDERS.map((item) => {
const Provider = allProviders[item.id]; const Provider = allProviders[item.id];
const installed = new Provider().installed; const installed = new Provider().installed;

View File

@ -0,0 +1,2 @@
export class FireWallet{}

View File

@ -226,7 +226,8 @@ function handNavCurent(nav) {
} else if(nav.id == 6) { } else if(nav.id == 6) {
window.open(`${location.origin}${nav.path}`, "_blank") window.open(`${location.origin}${nav.path}`, "_blank")
} else if(nav.id == 7) { } else if(nav.id == 7) {
window.open(`${location.origin}${nav.path}`, "_blank") // window.open(`${location.origin}${nav.path}`, "_blank")
router.push(nav.path);
} }
// if (nav.id == 1 || nav.id == 2 || nav.id == 3) { // if (nav.id == 1 || nav.id == 2 || nav.id == 3) {
// window.open(nav.path, "_blank"); // window.open(nav.path, "_blank");

File diff suppressed because one or more lines are too long

View File

@ -51,7 +51,7 @@ const claimLogDialogVisible = ref(false)
const connectLogin = async () => { const connectLogin = async () => {
console.log('address-----',localWalletStore.address,'passportAddress-----',localWalletStore.passportAddress,'-----',localWalletStore.eoaAddress) console.log('address-----',localWalletStore.address,'passportAddress-----',localWalletStore.passportAddress,'-----',localWalletStore.eoaAddress)
let res = await new BlockChain().cecLogin() let res = await new BlockChain().cecLogin('CECClaim','CECClaimCECClaimCECClaimCECClaim' )
console.log(res) console.log(res)
} }