File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed
Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -492,10 +492,7 @@ impl NearClient {
492492
493493 pub async fn get_nonce ( & self , signer : & InMemorySigner ) -> anyhow:: Result < ( CryptoHash , u64 ) > {
494494 let nonces = self . access_key_nonces . read ( ) . await ;
495- let cache_key = (
496- signer. account_id . clone ( ) ,
497- signer. secret_key . public_key ( ) . into ( ) ,
498- ) ;
495+ let cache_key = ( signer. account_id . clone ( ) , signer. secret_key . public_key ( ) ) ;
499496
500497 if let Some ( nonce) = nonces. get ( & cache_key) {
501498 let nonce = nonce. fetch_add ( 1 , Ordering :: SeqCst ) ;
@@ -520,9 +517,9 @@ impl NearClient {
520517 let response = self . client . call ( request) . await ?;
521518
522519 let block_hash = response. block_hash ;
523- let access_key = match response . kind {
524- QueryResponseKind :: AccessKey ( k ) => k ,
525- _ => anyhow:: bail!( "Wrong response kind: {:?}" , response. kind) ,
520+
521+ let QueryResponseKind :: AccessKey ( access_key ) = response . kind else {
522+ anyhow:: bail!( "Wrong response kind: {:?}" , response. kind)
526523 } ;
527524
528525 // case where multiple writers end up at the same lock acquisition point and tries
You can’t perform that action at this time.
0 commit comments