Skip to content

Commit

Permalink
Fix: removed array creation for parameters in fn params() implementat…
Browse files Browse the repository at this point in the history
…ion for send_tx method (#142)
  • Loading branch information
jaswinder6991 authored Apr 22, 2024
1 parent 2b4ad7b commit 3d1180c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/methods/broadcast_tx_async.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ impl From<RpcBroadcastTxAsyncRequest>
fn from(this: RpcBroadcastTxAsyncRequest) -> Self {
Self {
signed_transaction: this.signed_transaction,
wait_until: near_primitives::views::TxExecutionStatus::default(),
wait_until: near_primitives::views::TxExecutionStatus::None,
}
}
}
Expand Down
8 changes: 4 additions & 4 deletions src/methods/send_tx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ impl RpcMethod for RpcSendTransactionRequest {
}

fn params(&self) -> Result<serde_json::Value, io::Error> {
Ok(json!([
common::serialize_signed_transaction(&self.signed_transaction)?,
self.wait_until
]))
Ok(json!({
"signed_tx_base64": common::serialize_signed_transaction(&self.signed_transaction)?,
"wait_until": self.wait_until
}))
}
}

Expand Down

0 comments on commit 3d1180c

Please sign in to comment.