+func newMockWallet(store wt.WalletStore, account *account.Manager, asset *asset.Registry, chain *protocol.Chain, dispatcher *event.Dispatcher, txIndexFlag bool) *mockWallet {
+ wallet := &wt.Wallet{
+ Store: store,
+ AccountMgr: account,
+ AssetReg: asset,
+ Chain: chain,
+ RecoveryMgr: wt.NewRecoveryManager(store, account),
+ EventDispatcher: dispatcher,
+ TxIndexFlag: txIndexFlag,
+ }
+ wallet.TxMsgSub, _ = wallet.EventDispatcher.Subscribe(protocol.TxMsgEvent{})
+ return &mockWallet{wallet}
+
+}
+