*Add dummy handlers for eth_accounts and eth_requestAccounts
This commit is contained in:
parent
a473dfdad5
commit
b39af76606
|
@ -24,6 +24,8 @@ addHandler("presentSeed", handlePresentSeed);
|
||||||
addHandler("ready", handleReady);
|
addHandler("ready", handleReady);
|
||||||
|
|
||||||
[
|
[
|
||||||
|
"eth_accounts",
|
||||||
|
"eth_requestAccounts",
|
||||||
"eth_getBalance",
|
"eth_getBalance",
|
||||||
"eth_chainId",
|
"eth_chainId",
|
||||||
"eth_blockNumber",
|
"eth_blockNumber",
|
||||||
|
@ -56,6 +58,10 @@ async function handlePresentSeed() {
|
||||||
async function handleRpcMethod(aq: ActiveQuery) {
|
async function handleRpcMethod(aq: ActiveQuery) {
|
||||||
await moduleReady;
|
await moduleReady;
|
||||||
switch (aq.callerInput?.method) {
|
switch (aq.callerInput?.method) {
|
||||||
|
case "eth_accounts":
|
||||||
|
case "eth_requestAccounts": {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
case "eth_getBalance": {
|
case "eth_getBalance": {
|
||||||
return client.get_balance(
|
return client.get_balance(
|
||||||
aq.callerInput?.params[0],
|
aq.callerInput?.params[0],
|
||||||
|
|
Loading…
Reference in New Issue