explorer: Add IdentityModel

This commit is contained in:
Andras Slemmer 2016-09-02 17:16:58 +01:00
parent eb82e946d0
commit 0ae71d2f56
2 changed files with 11 additions and 0 deletions

View File

@ -8,6 +8,7 @@ import com.r3corda.client.model.Models
import com.r3corda.client.model.WalletMonitorModel
import com.r3corda.client.model.observer
import com.r3corda.core.contracts.ClientToServiceCommand
import com.r3corda.explorer.model.IdentityModel
import com.r3corda.node.driver.PortAllocation
import com.r3corda.node.driver.driver
import com.r3corda.node.driver.startClient
@ -48,6 +49,7 @@ class Main : App() {
val aliceClient = startClient(aliceNode).get()
Models.get<IdentityModel>(Main::class).myIdentity.set(aliceNode.identity)
Models.get<WalletMonitorModel>(Main::class).register(aliceClient, aliceNode)
val bobInStream = PublishSubject.create<ServiceToClientEvent>()

View File

@ -0,0 +1,9 @@
package com.r3corda.explorer.model
import com.r3corda.core.crypto.Party
import javafx.beans.property.SimpleObjectProperty
class IdentityModel {
val myIdentity = SimpleObjectProperty<Party>()
}