From c48e9b811a97c1b446a4aa320f3787d8fc872913 Mon Sep 17 00:00:00 2001 From: CounterFire2023 <136581895+CounterFire2023@users.noreply.github.com> Date: Wed, 13 Dec 2023 19:30:46 +0800 Subject: [PATCH] remove direct method check --- assets/scripts/libs/native_bridge.js | 3 ++- assets/scripts/run_sample.js | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/assets/scripts/libs/native_bridge.js b/assets/scripts/libs/native_bridge.js index 960e9c3..22103fd 100644 --- a/assets/scripts/libs/native_bridge.js +++ b/assets/scripts/libs/native_bridge.js @@ -203,7 +203,8 @@ window.addEventListener('walletcb', (e) => { } }); -const directMethod = new Set(['chainList', 'currentChain', 'exportWalletSecKey', 'formatPrice', 'tokenList']); +// const directMethod = new Set(['chainList', 'currentChain', 'exportWalletSecKey', 'formatPrice', 'tokenList']); +const directMethod = new Set([]); function callMethod(...args) { var methodName = args.shift(); let funid = ((Math.random() * 100000 + Math.random() * 1000) | 0) + ''; diff --git a/assets/scripts/run_sample.js b/assets/scripts/run_sample.js index 7307cb8..396fd3c 100644 --- a/assets/scripts/run_sample.js +++ b/assets/scripts/run_sample.js @@ -47,6 +47,10 @@ const pages = { let res = await callMethod('currentChain'); console.log(res); }, + tokenList: async function () { + let res = await callMethod('tokenList'); + console.log(res); + }, scanQRCode: async function () { let res = await callMethod('scanQRCode', 'scan'); console.log(res);