72 lines
1.4 KiB
TypeScript
72 lines
1.4 KiB
TypeScript
import { operation, OperationType } from '../Operation/Operation';
|
|
import { UIBase } from '../UI/UIBase';
|
|
|
|
const { ccclass, property } = cc._decorator;
|
|
|
|
@ccclass
|
|
export class IosWalletChooseTip extends UIBase {
|
|
public static prefabPath = 'prefabs/tips/pb_ioswallet';
|
|
|
|
init(data: any) {
|
|
throw new Error('Method not implemented.');
|
|
}
|
|
|
|
onClose() {
|
|
this.node.destroy();
|
|
}
|
|
|
|
onClickWallet(pram, walletIndex) {
|
|
operation.addOperation(
|
|
OperationType.WALLET,
|
|
'ioswalletchoose',
|
|
`${walletIndex}`
|
|
);
|
|
switch (walletIndex) {
|
|
case '0':
|
|
jsb.reflection.callStaticMethod(
|
|
'AppController',
|
|
'connectMetaMask'
|
|
);
|
|
break;
|
|
case '1':
|
|
jsb.reflection.callStaticMethod(
|
|
'AppController',
|
|
'connectCoinbase'
|
|
);
|
|
break;
|
|
case '2':
|
|
jsb.reflection.callStaticMethod(
|
|
'AppController',
|
|
'connectBitpie'
|
|
);
|
|
break;
|
|
case '3':
|
|
jsb.reflection.callStaticMethod(
|
|
'AppController',
|
|
'connectDcent'
|
|
);
|
|
break;
|
|
case '4':
|
|
jsb.reflection.callStaticMethod(
|
|
'AppController',
|
|
'connectimToken'
|
|
);
|
|
break;
|
|
case '5':
|
|
jsb.reflection.callStaticMethod(
|
|
'AppController',
|
|
'connectAlphaWallet'
|
|
);
|
|
break;
|
|
case '6':
|
|
jsb.reflection.callStaticMethod('AppController', 'connectMEW');
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
setTimeout(() => {
|
|
this.node.destroy();
|
|
}, 500);
|
|
}
|
|
}
|