Skip to content

Commit

Permalink
Add back eth_accounts logic for RPC (#1923)
Browse files Browse the repository at this point in the history
  • Loading branch information
DrPing authored Apr 19, 2023
1 parent 480e86f commit ad071d5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/ain-grpc/src/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ pub trait MetachainRPC {
fn call(&self, input: CallRequest) -> Result<String>;

#[method(name = "eth_accounts")]
fn accounts(&self) -> Result<Vec<H160>>;
fn accounts(&self) -> Result<Vec<String>>;

#[method(name = "eth_getBalance")]
fn get_balance(&self, address: H160) -> Result<U256>;
Expand Down Expand Up @@ -138,9 +138,9 @@ impl MetachainRPCServer for MetachainRPCModule {
Ok(hex::encode(data))
}

fn accounts(&self) -> Result<Vec<H160>> {
// Get from wallet
Ok(vec![])
fn accounts(&self) -> Result<Vec<String>> {
let accounts = ain_cpp_imports::get_accounts().unwrap();
Ok(accounts)
}

fn get_balance(&self, address: H160) -> Result<U256> {
Expand Down

0 comments on commit ad071d5

Please sign in to comment.