debug logging
All checks were successful
Build and Test / wii-sports-club (push) Successful in 3m48s
Build and Test / minecraft-wiiu (push) Successful in 3m55s
Build and Test / splatoon (push) Successful in 4m4s
Build and Test / mario-tennis (push) Successful in 4m5s
Build and Test / sonic-transformed (push) Successful in 4m6s
Build and Test / friends (push) Successful in 4m5s
Build and Test / fast-racing-neo (push) Successful in 4m6s
Build and Test / puyopuyo (push) Successful in 4m6s
Build and Test / splatoon-testfire (push) Successful in 4m21s
Build and Test / wii-u-chat (push) Successful in 4m21s
Build and Test / super-mario-maker (push) Successful in 5m6s
All checks were successful
Build and Test / wii-sports-club (push) Successful in 3m48s
Build and Test / minecraft-wiiu (push) Successful in 3m55s
Build and Test / splatoon (push) Successful in 4m4s
Build and Test / mario-tennis (push) Successful in 4m5s
Build and Test / sonic-transformed (push) Successful in 4m6s
Build and Test / friends (push) Successful in 4m5s
Build and Test / fast-racing-neo (push) Successful in 4m6s
Build and Test / puyopuyo (push) Successful in 4m6s
Build and Test / splatoon-testfire (push) Successful in 4m21s
Build and Test / wii-u-chat (push) Successful in 4m21s
Build and Test / super-mario-maker (push) Successful in 5m6s
This commit is contained in:
parent
bb0927c4a0
commit
09f8d33e0c
1 changed files with 11 additions and 7 deletions
|
|
@ -1,15 +1,15 @@
|
|||
use crate::grpc::account::Error::SomethingHappened;
|
||||
use json::{JsonValue, object};
|
||||
use nex_account::grpc::Pid;
|
||||
use nex_account::grpc::nex_account_service_client::NexAccountServiceClient;
|
||||
use once_cell::sync::Lazy;
|
||||
use rnex_core::PID;
|
||||
use std::array::TryFromSliceError;
|
||||
use std::ops::Deref;
|
||||
use std::{env, result};
|
||||
use std::sync::LazyLock;
|
||||
use std::{env, result};
|
||||
use thiserror::Error;
|
||||
use tokio::task::{JoinError, spawn_blocking};
|
||||
use nex_account::grpc::nex_account_service_client::NexAccountServiceClient;
|
||||
use nex_account::grpc::Pid;
|
||||
use tonic::transport::Channel;
|
||||
|
||||
static API_KEY: Lazy<String> = Lazy::new(|| {
|
||||
|
|
@ -52,15 +52,19 @@ pub struct Client(NexAccountServiceClient<Channel>); //(reqwest::Client);
|
|||
|
||||
impl Client {
|
||||
pub async fn new() -> Result<Self> {
|
||||
let client = NexAccountServiceClient::connect(NEX_ACCOUNT_URL.as_str())
|
||||
.await?;
|
||||
let client = NexAccountServiceClient::connect(NEX_ACCOUNT_URL.as_str()).await?;
|
||||
Ok(Self(client))
|
||||
}
|
||||
|
||||
pub async fn get_nex_key(&mut self, pid: PID) -> Result<[u8; 16]> {
|
||||
let prekey = self.0.get_nex_key_by_pid(Pid{pid}).await?.into_inner();
|
||||
let prekey = self.0.get_nex_key_by_pid(Pid { pid }).await?.into_inner();
|
||||
|
||||
let nexkey: [u8; 16] = prekey.key.try_into().map_err(|_| Error::SomethingHappened)?;
|
||||
println!("{:?}", prekey);
|
||||
|
||||
let nexkey: [u8; 16] = prekey
|
||||
.key
|
||||
.try_into()
|
||||
.map_err(|_| Error::SomethingHappened)?;
|
||||
|
||||
Ok(nexkey)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue