Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Dev]: Dev<->Master #4219

Merged
merged 21 commits into from
Jan 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
00a8744
Kotlin multiplatform leaking memory (#4037)
vcoolish Oct 1, 2024
2ed7098
[KMP] Fix issue: memory leak found in Base58.decode in iOS (#4031)
10gic Oct 1, 2024
5137601
Merge branch 'master' into dev
satoshiotomakan Oct 4, 2024
0b16771
[TON]: Add support for TON 24-words mnemonic (#3998)
satoshiotomakan Oct 4, 2024
b1f4543
Merge branch 'master' into dev
satoshiotomakan Oct 14, 2024
5d6f5b9
Merge branch 'master' into dev
satoshiotomakan Oct 15, 2024
aeb534d
Merge branch 'master' into dev
satoshiotomakan Oct 25, 2024
8121243
Fix Java JVM leak (#4092)
vcoolish Nov 4, 2024
e41d66f
Merge branch 'master' into dev
satoshiotomakan Nov 4, 2024
c61daac
[Chore]: Fix Android bindings (#4095)
satoshiotomakan Nov 5, 2024
0479584
Fix memory lead found in public key in kmp binding (#4097)
10gic Nov 6, 2024
77538af
Merge branch 'master' into dev
satoshiotomakan Nov 6, 2024
7409aa9
Merge branch 'master' into dev
satoshiotomakan Nov 22, 2024
20208f0
Update Callisto explorer (#4131)
vcoolish Nov 26, 2024
4411f22
Merge branch 'master' into dev
satoshiotomakan Nov 28, 2024
c007547
Revert "[TON]: Add support for TON 24-words mnemonic (#3998)" (#4148)
satoshiotomakan Dec 5, 2024
d4af84a
Merge branch 'master' into dev
satoshiotomakan Dec 17, 2024
dee25d4
Merge branch 'master' into dev
satoshiotomakan Dec 19, 2024
8b2cdb7
Fix JVM synchronization issue (#4218)
vcoolish Jan 16, 2025
28ced94
Merge branch 'master' into dev
satoshiotomakan Jan 16, 2025
4f47e13
[Misc]: Fix Clippy warnings
satoshiotomakan Jan 16, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion jni/java/wallet/core/java/GenericPhantomReference.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@
import java.lang.ref.ReferenceQueue;
import java.util.Set;
import java.util.HashSet;
import java.util.Collections;

public class GenericPhantomReference extends PhantomReference<Object> {
private final long nativeHandle;
private final OnDeleteCallback onDeleteCallback;

private static final Set<GenericPhantomReference> references = new HashSet<>();
private static final Set<GenericPhantomReference> references = Collections.synchronizedSet(new HashSet<>());
private static final ReferenceQueue<Object> queue = new ReferenceQueue<>();

static {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package com.trustwallet.core

import java.lang.ref.PhantomReference
import java.lang.ref.ReferenceQueue
import java.util.Collections

internal class GenericPhantomReference private constructor(
referent: Any,
Expand All @@ -10,7 +11,7 @@ internal class GenericPhantomReference private constructor(
) : PhantomReference<Any>(referent, queue) {

companion object {
private val references: MutableSet<GenericPhantomReference> = HashSet()
private val references: MutableSet<GenericPhantomReference> = Collections.synchronizedSet(HashSet())
private val queue: ReferenceQueue<Any> = ReferenceQueue()

init {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ pub trait BabylonOutputProtobuf {
) -> SigningResult<TransactionOutput>;
}

impl<'a, Context: UtxoContext> BabylonOutputProtobuf for OutputProtobuf<'a, Context> {
impl<Context: UtxoContext> BabylonOutputProtobuf for OutputProtobuf<'_, Context> {
fn babylon_staking(
&self,
staking: &Proto::mod_OutputBuilder::StakingOutput,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ pub trait BabylonUtxoProtobuf {
) -> SigningResult<(TransactionInput, UtxoToSign)>;
}

impl<'a, Context: UtxoContext> BabylonUtxoProtobuf for UtxoProtobuf<'a, Context> {
impl<Context: UtxoContext> BabylonUtxoProtobuf for UtxoProtobuf<'_, Context> {
fn babylon_staking_timelock(
&self,
timelock: &Proto::mod_InputBuilder::StakingTimelockPath,
Expand Down
2 changes: 1 addition & 1 deletion rust/chains/tw_solana/src/transaction/versioned.rs
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ impl<'de> Deserialize<'de> for MessagePrefix {
{
struct PrefixVisitor;

impl<'de> Visitor<'de> for PrefixVisitor {
impl Visitor<'_> for PrefixVisitor {
type Value = MessagePrefix;

fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
Expand Down
2 changes: 1 addition & 1 deletion rust/frameworks/tw_ton_sdk/src/boc/binary_writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ impl BinaryWriter {
} else {
self.write_bytes(&data[..data_len - 1])?;
let last_byte = data[data_len - 1];
let l = last_byte | 1 << (8 - rest_bits - 1);
let l = last_byte | (1 << (8 - rest_bits - 1));
self.write(8, l)?;
}

Expand Down
2 changes: 1 addition & 1 deletion rust/frameworks/tw_ton_sdk/src/boc/raw.rs
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ fn write_raw_cell(
if !full_bytes {
writer.write_bytes(&data[..data_len_bytes - 1])?;
let last_byte = data[data_len_bytes - 1];
let l = last_byte | 1 << (8 - padding_bits - 1);
let l = last_byte | (1 << (8 - padding_bits - 1));
writer.write(8, l)?;
} else {
writer.write_bytes(data)?;
Expand Down
4 changes: 1 addition & 3 deletions rust/tw_any_coin/src/wallet_connect_request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ impl WalletConnectRequest {
#[inline]
pub fn parse(coin: CoinType, input: &[u8]) -> SigningResult<Data> {
let (ctx, entry) = coin_dispatcher(coin)?;
entry
.wallet_connect_parse_request(&ctx, input)
.map_err(SigningError::from)
entry.wallet_connect_parse_request(&ctx, input)
}
}
2 changes: 1 addition & 1 deletion rust/tw_encoding/src/hex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ pub trait DecodeHex {
fn decode_hex(&self) -> FromHexResult<Data>;
}

impl<'a> DecodeHex for &'a str {
impl DecodeHex for &str {
fn decode_hex(&self) -> FromHexResult<Data> {
decode(self)
}
Expand Down
2 changes: 1 addition & 1 deletion rust/tw_evm/src/message/eip712/message_types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ pub struct CustomTypeBuilder<'a> {
type_properties: &'a mut Vec<Property>,
}

impl<'a> CustomTypeBuilder<'a> {
impl CustomTypeBuilder<'_> {
pub fn add_property(&mut self, name: &str, property_type: PropertyType) -> &mut Self {
self.type_properties.push(Property {
name: name.to_string(),
Expand Down
4 changes: 2 additions & 2 deletions rust/tw_misc/src/test_utils/json.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ impl ToJson for Json {
}
}

impl<'a> ToJson for Cow<'a, str> {
impl ToJson for Cow<'_, str> {
#[track_caller]
fn to_json(&self) -> Json {
self.as_ref().to_json()
Expand All @@ -30,7 +30,7 @@ impl ToJson for String {
}
}

impl<'a> ToJson for &'a str {
impl ToJson for &str {
#[track_caller]
fn to_json(&self) -> Json {
serde_json::from_str(self).expect("Error on deserializing JSON from string")
Expand Down
2 changes: 1 addition & 1 deletion tools/install-rust-dependencies
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -e

NIGHTLY="nightly-2024-06-13"
NIGHTLY="nightly-2025-01-16"

rustup toolchain install $NIGHTLY
rustup default $NIGHTLY
Expand Down
Loading