Here we simply return the Wallet as per the definition in the Store. In fact, since the DB has a column userId, this field will be part of the response payload. We should therefore establish a mapping to the API type prior to emitting the event.
|
notifier?.emit('accountsChanged', await store.getWallets()) |