Skip to content

Commit

Permalink
bump
Browse files Browse the repository at this point in the history
  • Loading branch information
rahul-soshte committed Nov 20, 2024
1 parent b265bf8 commit 358114a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "stellar-baselib"
version = "0.3.9"
version = "0.4.0"
edition = "2021"
description = "A low level Rust library that offers a comprehensive set of functions for reading, writing, hashing, and signing primitive XDR constructs utilized in the Stellar network"
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Add this to your Cargo.toml:

```toml
[dependencies]
stellar-baselib = "0.3.9"
stellar-baselib = "0.4.0"
```

And this to your code:
Expand Down
12 changes: 2 additions & 10 deletions src/transaction_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,6 @@ impl TransactionBuilderBehavior for TransactionBuilder {
let current_seq_num = BigUint::from_str(source_ref.sequence_number().as_str()).unwrap();
let incremented_seq_num = current_seq_num.clone() + BigUint::from(1u32);
source_ref.increment_sequence_number();

let fee = self
.fee
.unwrap()
Expand All @@ -203,24 +202,17 @@ impl TransactionBuilderBehavior for TransactionBuilder {
let hex_val = binding.as_bytes();
let mut array: [u8; 32] = [0; 32];
array.copy_from_slice(&hex_val[..32]);


let ext_on_the_fly = if self.soroban_data.is_some() {
TransactionExt::V1(self.soroban_data.clone().unwrap())
} else {
TransactionExt::V0
};


// let old = MuxedAccount::Ed25519(Uint256::from(array));
// let new = encode_muxed_account(account_id, &incremented_seq_num.to_string());
// println!("Incremented {:?}", incremented_seq_num);
let vv = decode_address_to_muxed_account_fix_for_g_address(account_id);

let tx_obj = stellar_xdr::next::Transaction {
source_account: vv, // MuxedAccount::Ed25519(Uint256([0; 32]))
source_account: vv,
fee: fee.unwrap(),
seq_num: SequenceNumber(incremented_seq_num.clone().clone().try_into().unwrap_or_else(|_| panic!("Number too large for i64"))),
seq_num: SequenceNumber(current_seq_num.clone().clone().try_into().unwrap_or_else(|_| panic!("Number too large for i64"))),
cond: Preconditions::None,
memo: Memo::None,
operations: self.operations.clone().unwrap().try_into().unwrap(),
Expand Down

0 comments on commit 358114a

Please sign in to comment.