update
This commit is contained in:
parent
de30010a34
commit
e3f8c396f7
@ -172,7 +172,6 @@ cc.Class({
|
||||
},
|
||||
|
||||
showchainErrTip(){
|
||||
console.log("链id错误")
|
||||
uimanger.showUI(ChainErrTip.prefabPath);
|
||||
},
|
||||
|
||||
|
@ -6,7 +6,6 @@ const { ccclass, property } = cc._decorator;
|
||||
export default class ChainErrTip extends UIBase {
|
||||
public static prefabPath = "prefabs/tips/pb_chainerr";
|
||||
|
||||
|
||||
init(data: any) {
|
||||
//
|
||||
}
|
||||
@ -33,8 +32,7 @@ export default class ChainErrTip extends UIBase {
|
||||
);
|
||||
}
|
||||
|
||||
this.node.destroy()
|
||||
|
||||
this.node.destroy();
|
||||
}
|
||||
|
||||
onClose() {
|
||||
|
@ -40,13 +40,13 @@ import com.youme.voiceengine.api;
|
||||
import com.youme.voiceengine.mgr.YouMeManager;
|
||||
|
||||
import org.cocos2dx.javascript.wc.JWCSession;
|
||||
import org.cocos2dx.javascript.wc.entity.CallResult;
|
||||
import org.cocos2dx.javascript.wc.entity.ChainObj;
|
||||
import org.cocos2dx.javascript.wc.entity.ChangeChainObj;
|
||||
import org.cocos2dx.javascript.wc.CallResult;
|
||||
import org.cocos2dx.javascript.wc.ChainObj;
|
||||
import org.cocos2dx.lib.Cocos2dxActivity;
|
||||
import org.cocos2dx.lib.Cocos2dxGLSurfaceView;
|
||||
import org.cocos2dx.lib.Cocos2dxJavascriptJavaBridge;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.json.JSONObject;
|
||||
import org.walletconnect.Session;
|
||||
|
||||
import java.io.IOException;
|
||||
@ -418,17 +418,15 @@ public class AppActivity extends Cocos2dxActivity implements YouMeCallBackInterf
|
||||
* }
|
||||
*/
|
||||
public static void addChain(String paramStr){
|
||||
System.out.println("链信息"+paramStr);
|
||||
final Moshi moshi = new Moshi.Builder().build();
|
||||
JsonAdapter<ChainObj> jsonAdapter = moshi.adapter(ChainObj.class);
|
||||
try {
|
||||
final ChainObj chainObj = jsonAdapter.fromJson(paramStr);
|
||||
Log.i(TAG, chainObj.toString());
|
||||
List paramList = new ArrayList<>();
|
||||
paramList.add(chainObj);
|
||||
Log.i(TAG, "addChain");
|
||||
long time = System.currentTimeMillis();
|
||||
|
||||
ExampleApplication.session.performMethodCall(new Session.MethodCall.Custom(time, "eth_signTypedData", paramList), new Function1<Session.MethodCall.Response, Unit>() {
|
||||
ExampleApplication.session.performMethodCall(new Session.MethodCall.Custom(time, "wallet_addEthereumChain", paramList), new Function1<Session.MethodCall.Response, Unit>() {
|
||||
@Override
|
||||
public Unit invoke(Session.MethodCall.Response resp) {
|
||||
CallResult result = new CallResult("addChain");
|
||||
|
@ -36,7 +36,6 @@
|
||||
"height": 640,
|
||||
"width": 960
|
||||
},
|
||||
"start-scene": "current",
|
||||
"use-customize-simulator": true,
|
||||
"use-project-simulator-setting": false
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user