Add OnlineWallet::getNetwork

This commit is contained in:
artfuldev committed 2021-10-15 00:48:53 +05:30
1 parent 0fc04fc34e
commit 40a4b58757
4 files changed
+38 -17

No files matched your search

+1
View File
@@ -94,4 +94,5 @@ interface BlockchainConfig {
interface OnlineWallet {
[Throws=BdkError]
constructor(string descriptor, Network network, DatabaseConfig database_config, BlockchainConfig blockchain_config);
Network get_network();
};
+4
View File
@@ -117,6 +117,10 @@ impl OnlineWallet {
)?);
Ok(OnlineWallet { wallet })
}
fn get_network(&self) -> Network {
self.wallet.lock().unwrap().network()
}
}
uniffi::deps::static_assertions::assert_impl_all!(OfflineWallet: Sync, Send);