Skip to content

Commit

Permalink
rename set_params_builder to set_additional_params
Browse files Browse the repository at this point in the history
  • Loading branch information
haerdib committed Jan 3, 2023
1 parent 0971d2f commit 73c0fd5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions examples/examples/compose_extrinsic_offline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ async fn main() {
.era(Era::mortal(period, header.number.into()), last_finalized_header_hash)
.tip(0);

// Set the custom params builder.
api.set_extrinsic_params_builder(tx_params);
// Set the additional params.
api.set_additional_params(tx_params);

// Get the nonce of the signer account (online).
let signer_nonce = api.get_nonce().unwrap();
Expand Down
4 changes: 2 additions & 2 deletions examples/examples/custom_nonce.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ async fn main() {
.era(Era::mortal(period, header.number.into()), last_finalized_header_hash)
.tip(0);

// Set the custom parmas builder.
api.set_extrinsic_params_builder(tx_params);
// Set the custom additional params.
api.set_additional_params(tx_params);

// Get the nonce of Alice.
let signer_nonce = api.get_nonce().unwrap();
Expand Down
4 changes: 2 additions & 2 deletions src/api/api_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ where
}

/// Set the extrinscs param builder.
pub fn set_extrinsic_params_builder(&mut self, extrinsic_params: Params::AdditionalParams) {
pub fn set_additional_params(&mut self, extrinsic_params: Params::AdditionalParams) {
self.additional_extrinsic_params = Some(extrinsic_params);
}

Expand Down Expand Up @@ -300,7 +300,7 @@ mod tests {

// Information for Era for mortal transactions.
let builder = DefaultAdditionalParams::new();
api.set_extrinsic_params_builder(builder);
api.set_additional_params(builder);

let nonce = 6;
let retrieved_params = api.extrinsic_params(nonce);
Expand Down

0 comments on commit 73c0fd5

Please sign in to comment.