-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Require NEAR regular RPC URL additionally in configs (#137)
* feat: Require NEAR regular RPC URL additionally in configs * improvement according comments * improve naming
- Loading branch information
Showing
9 changed files
with
127 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,11 @@ | ||
use crate::config::ServerContext; | ||
use crate::errors::RPCError; | ||
use crate::utils::proxy_rpc_call; | ||
use jsonrpc_v2::{Data, Params}; | ||
|
||
pub async fn gas_price( | ||
data: Data<ServerContext>, | ||
Params(params): Params<near_jsonrpc_primitives::types::gas_price::RpcGasPriceRequest>, | ||
) -> Result<near_jsonrpc_primitives::types::gas_price::RpcGasPriceResponse, RPCError> { | ||
let gas_price_view = proxy_rpc_call(&data.near_rpc_client, params).await?; | ||
let gas_price_view = data.near_rpc_client.call(params).await?; | ||
Ok(near_jsonrpc_primitives::types::gas_price::RpcGasPriceResponse { gas_price_view }) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.