diff --git a/src/views/ImportAccountView.vue b/src/views/ImportAccountView.vue
index 086680c07..5c28aa325 100644
--- a/src/views/ImportAccountView.vue
+++ b/src/views/ImportAccountView.vue
@@ -53,6 +53,13 @@
+
+
+
+
+
@@ -79,8 +86,8 @@
import { Component, Vue } from "vue-facing-decorator";
import { Router } from "vue-router";
-import { NotificationIface } from "@/constants/app";
-import { accountsDB, db } from "@/db/index";
+import { AppString, NotificationIface } from "@/constants/app";
+import { accountsDB, db, retrieveSettingsForActiveAccount } from "@/db/index";
import { MASTER_SETTINGS_KEY } from "@/db/tables/settings";
import {
DEFAULT_ROOT_DERIVATION_PATH,
@@ -92,28 +99,40 @@ import {
components: {},
})
export default class ImportAccountView extends Vue {
+ TEST_USER_0_MNEMONIC =
+ "rigid shrug mobile smart veteran half all pond toilet brave review universe ship congress found yard skate elite apology jar uniform subway slender luggage";
UPORT_DERIVATION_PATH = "m/7696500'/0'/0'/0'"; // for legacy imports, likely never used
+ AppString = AppString;
+
$notify!: (notification: NotificationIface, timeout?: number) => void;
- mnemonic = "";
+ apiServer = "";
address = "";
+ derivationPath = DEFAULT_ROOT_DERIVATION_PATH;
+ mnemonic = "";
numAccounts = 0;
privateHex = "";
publicHex = "";
- derivationPath = DEFAULT_ROOT_DERIVATION_PATH;
showAdvanced = false;
shouldErase = false;
async created() {
await accountsDB.open();
this.numAccounts = await accountsDB.accounts.count();
+ // get the server, to help with import on the test server
+ const settings = await retrieveSettingsForActiveAccount();
+ this.apiServer = settings.apiServer || "";
}
public onCancelClick() {
(this.$router as Router).back();
}
+ public isNotProdServer() {
+ return this.apiServer !== AppString.PROD_ENDORSER_API_SERVER;
+ }
+
public async fromMnemonic() {
const mne: string = this.mnemonic.trim().toLowerCase();
try {