Skip to content

Commit

Permalink
Remove active_address from WalletInfo (#95)
Browse files Browse the repository at this point in the history
  • Loading branch information
ok300 authored Apr 19, 2024
1 parent 2929d66 commit 908c9be
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion lib/ls-sdk-bindings/src/ls_sdk.udl
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ enum Network {
dictionary WalletInfo {
u64 balance_sat;
string pubkey;
string active_address;
};

dictionary PrepareSendResponse {
Expand Down
1 change: 0 additions & 1 deletion lib/ls-sdk-core/src/model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,6 @@ impl From<lwk_signer::SignerError> for PaymentError {
pub struct WalletInfo {
pub balance_sat: u64,
pub pubkey: String,
pub active_address: String,
}

#[derive(Debug)]
Expand Down
3 changes: 2 additions & 1 deletion lib/ls-sdk-core/src/wallet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -250,10 +250,11 @@ impl Wallet {
}

pub fn get_info(&self, with_scan: bool) -> Result<WalletInfo> {
debug!("active_address: {}", self.address()?);

Ok(WalletInfo {
balance_sat: self.total_balance_sat(with_scan)?,
pubkey: self.signer.xpub().public_key.to_string(),
active_address: self.address()?.to_string(),
})
}

Expand Down

0 comments on commit 908c9be

Please sign in to comment.