-
Notifications
You must be signed in to change notification settings - Fork 37
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
Enable Esplora async client #483
base: master
Are you sure you want to change the base?
Conversation
WalkthroughThe project has undergone significant updates across its Android and JVM components. Java has been upgraded to version 17, Kotlin to version 1.9.23, and Rust to 1.73.0 in the workflows. Python testing now includes versions 3.11 and 3.12. Key Gradle plugins and dependencies have been updated, with notable changes in Android build configurations and enhanced error handling capabilities in the FFI module. Changes
Recent Review DetailsConfiguration used: CodeRabbit UI Files ignored due to path filters (1)
Files selected for processing (3)
Additional comments not posted (4)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
bdk-ffi/src/types.rs
Outdated
use bdk::wallet::AddressInfo as BdkAddressInfo; | ||
use bdk::wallet::Balance as BdkBalance; | ||
use bdk::KeychainKind; | ||
|
||
use bdk::LocalOutput as BdkLocalOutput; | ||
|
||
use bdk::FeeRate as BdkFeeRate; | ||
use bdk::bitcoin::FeeRate as BdkFeeRate; | ||
|
||
use crate::error::FeeRateError; | ||
use std::sync::Arc; | ||
|
||
#[derive(Clone, Debug)] | ||
pub struct FeeRate(pub BdkFeeRate); | ||
|
||
impl FeeRate { | ||
pub fn from_sat_per_vb(sat_per_vb: f32) -> Self { | ||
FeeRate(BdkFeeRate::from_sat_per_vb(sat_per_vb)) | ||
pub fn from_sat_per_vb(sat_per_vb: u64) -> Result<Self, FeeRateError> { | ||
let fee_rate: Option<BdkFeeRate> = BdkFeeRate::from_sat_per_vb(sat_per_vb); | ||
match fee_rate { | ||
Some(fee_rate) => Ok(FeeRate(fee_rate)), | ||
None => Err(FeeRateError::ArithmeticOverflow), | ||
} | ||
} | ||
|
||
pub fn from_sat_per_kwu(sat_per_kwu: f32) -> Self { | ||
pub fn from_sat_per_kwu(sat_per_kwu: u64) -> Self { | ||
FeeRate(BdkFeeRate::from_sat_per_kwu(sat_per_kwu)) | ||
} | ||
|
||
pub fn as_sat_per_vb(&self) -> f32 { | ||
self.0.as_sat_per_vb() | ||
pub fn to_sat_per_vb_ceil(&self) -> u64 { | ||
self.0.to_sat_per_vb_ceil() | ||
} | ||
|
||
pub fn to_sat_per_vb_floor(&self) -> u64 { | ||
self.0.to_sat_per_vb_floor() | ||
} | ||
|
||
pub fn sat_per_kwu(&self) -> f32 { | ||
self.0.sat_per_kwu() | ||
pub fn to_sat_per_kwu(&self) -> u64 { | ||
self.0.to_sat_per_kwu() | ||
} | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📝 NOTE
This review was outside the diff hunks, and no overlapping diff hunk was found. Original lines [92-92]
The TODO comment regarding the Peek
implementation in AddressIndex
suggests incomplete functionality. It's important to address this to ensure full functionality and avoid unexpected behavior.
Would you like assistance in implementing or testing the Peek
functionality?
9243438
to
27b3567
Compare
This is just to open up the work on async Esplora.