Skip to content

Commit cb5cd20

Browse files
authored
Merge pull request #92 from aurora-is-near/aurora-typed-requests
General improvements, fixes, adjustments
2 parents 55ff43f + eec1a62 commit cb5cd20

File tree

17 files changed

+304
-118
lines changed

17 files changed

+304
-118
lines changed

Cargo.lock

Lines changed: 67 additions & 36 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ near-chain-configs = "0.30"
3030
near-contract-standards = "5"
3131
near-crypto = "0.30"
3232
near-gas = "0.3"
33+
near-sdk = "5"
3334
near-token = { version = "0.3", features = ["borsh", "serde"] }
3435
near-jsonrpc-client = "0.17"
3536
near-jsonrpc-primitives = "0.30"

sdk/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ borsh.workspace = true
1717
near-gas.workspace = true
1818
near-token.workspace = true
1919
near-primitives.workspace = true
20+
near-sdk.workspace = true
2021
tokio = { workspace = true, features = ["macros", "rt-multi-thread"] }
2122
serde.workspace = true
2223
serde_json.workspace = true

sdk/examples/client.rs

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,13 @@ async fn main() -> anyhow::Result<()> {
1919
Ok(())
2020
}
2121

22-
fn signer() -> anyhow::Result<InMemorySigner> {
23-
let signer = std::env::var("NEAR_KEY_PATH")
22+
fn signer() -> anyhow::Result<Signer> {
23+
std::env::var("NEAR_KEY_PATH")
2424
.ok()
2525
.as_ref()
2626
.map(std::path::Path::new)
2727
.ok_or_else(|| {
2828
anyhow::anyhow!("Path to the key file must be provided to use this functionality")
2929
})
30-
.and_then(|path| InMemorySigner::from_file(path).map_err(Into::into))?;
31-
32-
match signer {
33-
Signer::Empty(_) => panic!("Signer must not be empty"),
34-
Signer::InMemory(signer) => Ok(signer),
35-
}
30+
.and_then(|path| InMemorySigner::from_file(path).map_err(Into::into))
3631
}

0 commit comments

Comments
 (0)