add
This commit is contained in:
parent
6c4d382625
commit
93e6b2bfc9
@ -3104,7 +3104,7 @@
|
|||||||
"_position": {
|
"_position": {
|
||||||
"__type__": "cc.Vec3",
|
"__type__": "cc.Vec3",
|
||||||
"x": -26.5,
|
"x": -26.5,
|
||||||
"y": 107.8,
|
"y": 129.2,
|
||||||
"z": 0
|
"z": 0
|
||||||
},
|
},
|
||||||
"_scale": {
|
"_scale": {
|
||||||
|
@ -28,6 +28,10 @@ window.connectOK = (account) => {
|
|||||||
jclogin.getNonce();
|
jclogin.getNonce();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
window.chainErr = ()=>{
|
||||||
|
console.log("chain err")
|
||||||
|
};
|
||||||
|
|
||||||
window.signApp = (sign) => {
|
window.signApp = (sign) => {
|
||||||
jcgamelog.addOperation(OperationType.WALLET, 'signature success');
|
jcgamelog.addOperation(OperationType.WALLET, 'signature success');
|
||||||
|
|
||||||
|
40
assets/scripts/tips/ChainErrTip.ts
Normal file
40
assets/scripts/tips/ChainErrTip.ts
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
import { UIBase } from "../UI/UIBase";
|
||||||
|
|
||||||
|
const { ccclass, property } = cc._decorator;
|
||||||
|
|
||||||
|
@ccclass
|
||||||
|
export default class ChainErrTip extends UIBase {
|
||||||
|
public static prefabPath = "prefabs/tips/pb_chainerr";
|
||||||
|
@property(cc.Label) namelabel: cc.Label = null;
|
||||||
|
|
||||||
|
init(data: any) {
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
onClickOK() {
|
||||||
|
var chainInfo = {
|
||||||
|
chainId: "0x141",
|
||||||
|
chainName: "KCC Mainnet",
|
||||||
|
nativeCurrency: {
|
||||||
|
name: "kccToken",
|
||||||
|
symbol: "KCS",
|
||||||
|
decimals: 18,
|
||||||
|
},
|
||||||
|
blockExplorerUrls: ["https://explorer.kcc.io/en"],
|
||||||
|
rpcUrls: ["https://rpc-mainnet.kcc.network"],
|
||||||
|
};
|
||||||
|
|
||||||
|
if (cc.sys.os == cc.sys.OS_ANDROID) {
|
||||||
|
jsb.reflection.callStaticMethod(
|
||||||
|
"org/cocos2dx/javascript/AppActivity",
|
||||||
|
"addChain",
|
||||||
|
"(Ljava/lang/String;)V",
|
||||||
|
JSON.stringify(chainInfo)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
onClose() {
|
||||||
|
// this.node.destroy();
|
||||||
|
}
|
||||||
|
}
|
9
assets/scripts/tips/ChainErrTip.ts.meta
Normal file
9
assets/scripts/tips/ChainErrTip.ts.meta
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"ver": "1.0.5",
|
||||||
|
"uuid": "898d0b7d-c207-4bfa-bd0a-81b8221cb4ce",
|
||||||
|
"isPlugin": false,
|
||||||
|
"loadPluginInWeb": true,
|
||||||
|
"loadPluginInNative": true,
|
||||||
|
"loadPluginInEditor": false,
|
||||||
|
"subMetas": {}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user