40 lines
727 B
TypeScript
40 lines
727 B
TypeScript
import JCWallet from "../JCWallet";
|
|
import ChainTab from "./ChainTab";
|
|
import WalletBase from "./WallerBase";
|
|
|
|
const {ccclass, property} = cc._decorator;
|
|
|
|
@ccclass
|
|
export default class WalletMainPanel extends WalletBase {
|
|
private wallet: JCWallet
|
|
|
|
@property({
|
|
type: ChainTab
|
|
})
|
|
chainTab: ChainTab = null
|
|
|
|
// LIFE-CYCLE CALLBACKS:
|
|
|
|
// onLoad () {}
|
|
|
|
start () {
|
|
this.wallet = new JCWallet()
|
|
}
|
|
|
|
// update (dt) {}
|
|
|
|
hideWallet() {
|
|
this.node.active = false
|
|
}
|
|
|
|
updateChainList() {
|
|
const chains = this.wallet.chainList
|
|
if (!chains || chains.length === 0) {
|
|
return;
|
|
}
|
|
for (const chain of chains) {
|
|
|
|
}
|
|
}
|
|
}
|