Skip to content

Commit

Permalink
Add parameter walletId that will be used as db name suffix (#184)
Browse files Browse the repository at this point in the history
  • Loading branch information
abdrasulov committed Dec 24, 2018
1 parent 8f65ff3 commit d4cc51e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import io.realm.annotations.RealmModule
@RealmModule(library = true, allClasses = true)
class BitcoinKitModule

class BitcoinKit(words: List<String>, networkType: NetworkType, peerSize: Int = 10, newWallet: Boolean = false, confirmationsThreshold: Int = 6) : KitStateProvider.Listener, DataProvider.Listener {
class BitcoinKit(words: List<String>, networkType: NetworkType, walletId: String? = null, peerSize: Int = 10, newWallet: Boolean = false, confirmationsThreshold: Int = 6) : KitStateProvider.Listener, DataProvider.Listener {

interface Listener {
fun onTransactionsUpdate(bitcoinKit: BitcoinKit, inserted: List<TransactionInfo>, updated: List<TransactionInfo>, deleted: List<Int>)
Expand All @@ -55,7 +55,7 @@ class BitcoinKit(words: List<String>, networkType: NetworkType, peerSize: Int =
private val transactionBuilder: TransactionBuilder
private val dataProvider: DataProvider
private val unspentOutputProvider: UnspentOutputProvider
private val realmFactory = RealmFactory("bitcoinkit-${networkType.name}")
private val realmFactory = RealmFactory("bitcoinkit-${networkType.name}-$walletId")

private val network = when (networkType) {
NetworkType.MainNet -> MainNet()
Expand Down

0 comments on commit d4cc51e

Please sign in to comment.