Dagger 2 with ViewModel, Repository, Room and Coroutines

I’ trying to utilize Dagger 2 in a ViewModel + Respository + Room + Retrofit + Coroutines project written in Kotlin. Currently each ViewModel initializes required repositories and their dependences by itself like so class HomeViewModel( application: Application ) : AndroidViewModel(application) { private val repository: UserRepository = UserRepository( Webservice.create(), AppDatabase.getDatabase(application, viewModelScope).userDao() ) I would like…

Details

Use both Vuetify and Vue-i18n translations

I am using Vuetify and want to add my own translations for buttons for example and also use the translations provided by Vuetify. I currently have my Vuetify config file setup like this: import Vue from “vue” import Vuetify from “vuetify” import “vuetify/dist/vuetify.min.css” import “@fortawesome/fontawesome-free/css/all.css” import VueI18n from “vue-i18n” import messages from “./i18n” import en…

Details

Signing Ropsten transactions with

I am trying to sign transactions using the Web3 HDWalletProvider package and an infura API. I am using the following code: const Web3 = require(‘web3’); const Web3HDWalletProvider = require(“web3-hdwallet-provider”); const mnemonic = “12 words” var httpProvider = new Web3.providers.HttpProvider(‘https://ropsten.infura.io/v3/[API]’); var provider = new Web3HDWalletProvider(mnemonic, httpProvider); I get the error Uncaught ReferenceError: require is not defined…

Details