Skip to content

Commit

Permalink
Merge pull request #19 from 0xcregis/18-assign-seqno-to-query-id-in-j…
Browse files Browse the repository at this point in the history
…etton-transfer

feat: assign seqno to query id in jetton transfer
  • Loading branch information
loki-cmu authored Nov 5, 2024
2 parents f76b46a + e760b7f commit dbee227
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "anychain-ton"
description = "A Rust library for Ton-focused cryptocurrency wallets, enabling seamless transactions on the Ton blockchain"
version = "0.1.15"
version = "0.1.16"
keywords = ["ton", "blockchain", "wallet", "transactions"]
categories = ["cryptography::cryptocurrencies"]
authors = ["Shawndslee", "cregis.com"]
Expand Down
10 changes: 4 additions & 6 deletions src/transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ impl Transaction for TonTransaction {

let jetton_transfer = Arc::new(
JettonTransferMessage {
query_id: 1,
query_id: self.params.seqno as u64,
amount,
destination: to.clone(),
response_destination: InnerAddress::NULL,
Expand All @@ -251,7 +251,7 @@ impl Transaction for TonTransaction {
.unwrap(),
);

let fee = BigUint::from(15000000u64);
let fee = BigUint::from(20000000u64);

let transfer = TransferMessage::new(CommonMsgInfo::new_internal_non_bounceable(
jetton_wallet,
Expand Down Expand Up @@ -380,8 +380,8 @@ mod tests {
from: from.clone(),
to: to.clone(),
amount: 10000000000,
seqno: 14,
comment: "mao".to_string(),
seqno: 23,
comment: "Pythagorus".to_string(),
now: 1728698931,
public_key,
};
Expand All @@ -394,8 +394,6 @@ mod tests {
let tx = tx.sign(sig, 0).unwrap();
let tx = STANDARD.encode(&tx);

assert_eq!("te6cckEBBAEA6wABRYgB7vPpWGj94mppGQVH3ZFLNB3ks+kcehtVwh+znnKcNJYMAQGc/iYDYphcJvh20m+5vP31su3pQMMAAbeTHORTUSW5DjX1CcBZR7mo3iJN+54RV3mcleW81wLUyo+jpQdnlHGgASmpoxdnCdyLAAAADgADAgFmQgA4w19SOb5FPg7xe6q7Piln+D04Y4A2/jYey00vexOEyR8nDgAAAAAAAAAAAAAAAAABAwB3D4p+pQAAAAAAAAABUCVAvkAIAHS21lKJPQfwCj/R46b5RIUTfW7JKnT5XgOI6tO+2ykqBAQAAAAA2sLfzkxo+A==", tx);

let _ = TonTransaction::from_str(&tx).unwrap();

// let api_key = "a8b61ced4be11488cb6e82d65b93e3d4a29d20af406aed9688b9e0077e2dc742".to_string();
Expand Down

0 comments on commit dbee227

Please sign in to comment.