Change get_balance to return in categories.
Add type balance with add, display traits. Change affected tests. Update `CHANGELOG.md`
This commit is contained in:
committed by
Daniela Brozzoni
parent
dc7adb7161
commit
0f03831274
@@ -385,7 +385,7 @@ mod test {
|
||||
.sync_wallet(&wallet, None, Default::default())
|
||||
.unwrap();
|
||||
|
||||
assert_eq!(wallet.get_balance().unwrap(), 50_000);
|
||||
assert_eq!(wallet.get_balance().unwrap().untrusted_pending, 50_000);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
@@ -194,7 +194,7 @@ This example shows how to sync multiple walles and return the sum of their balan
|
||||
# use bdk::database::*;
|
||||
# use bdk::wallet::*;
|
||||
# use bdk::*;
|
||||
fn sum_of_balances<B: BlockchainFactory>(blockchain_factory: B, wallets: &[Wallet<MemoryDatabase>]) -> Result<u64, Error> {
|
||||
fn sum_of_balances<B: BlockchainFactory>(blockchain_factory: B, wallets: &[Wallet<MemoryDatabase>]) -> Result<Balance, Error> {
|
||||
Ok(wallets
|
||||
.iter()
|
||||
.map(|w| -> Result<_, Error> {
|
||||
|
||||
Reference in New Issue
Block a user