diff --git a/README.md b/README.md index 78d0d7c9..7a84a336 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,9 @@ npm run serve ``` ### Compiles and minifies for production + +If you are deploying in a subdirectory, add it to `publicPath` in vue.config.js, eg: `publicPath: "/app/time-tracker/",` + ``` npm run build ``` diff --git a/project.task.yaml b/project.task.yaml index d9dc2894..763accab 100644 --- a/project.task.yaml +++ b/project.task.yaml @@ -15,9 +15,9 @@ tasks: - 08 Scan QR code to import into contacts assignee:matthew - SEE: https://github.com/gruhn/vue-qrcode-reader -- Show pop-up or some message confirming that settings & contacts download has been initiated/finished assignee:matthew +- 01 Show pop-up or some message confirming that settings & contacts download has been initiated/finished assignee:matthew -- Ensure each action sent to the server has a confirmation - eg registration (ie a toast something that dismisses after 5-10s) +- 01 Ensure each action sent to the server has a confirmation - eg registration (ie a toast something that dismisses after 5-10s) - SEE: https://github.com/emmanuelsw/notiwind assignee:jose - Home Feed & Quick Give screen : @@ -27,6 +27,7 @@ tasks: - 24 Move to Vite assignee:matthew +- .5 include the hash of the latest commit, and maybe a version - .5 add link to further project / people when a project pays ahead - .5 add project ID to the URL, to make a project publicly-accessible - .5 remove edit from project page for projects owned by others @@ -36,9 +37,18 @@ tasks: - .2 fix rate limit verbiage (with the new one-per-day allowance) assignee:trent - .2 move 'switch identity' to the advanced section - .1 remove the logic to exclude beforeId in list of plans after server has commit 26b25af605e715600d4f12b6416ed9fd7142d164 +- .2 in SeedBackupView, don't load the mnemonic and keep it in memory; only load it when they click "show" - Discuss whether the remaining tasks are worthwhile before MVP release. +- 04 allow user to download claims, mine + ones I can see about me from others +- .5 change the derivation path, and regenerate test IDs +- 02 allow user to create new DIDs from the same seed phrase (ie. increment derivation path) +- .5 on ProjectView page, show immediate feedback when a gift is given (on list?) -- and consider the same for Home & Contacts pages +- .5 customize favicon +- .5 Do we want to combine first name & last name? +- .2 Show a warning if both giver and recipient are the same (but still allow?) + - contacts v+ : - 01 Import all the non-sensitive data (ie. contacts & settings). - .2 show error to user when adding a duplicate contact @@ -51,12 +61,6 @@ tasks: - maybe - allow type annotations in World.js & landmarks.js (since we get this error - "Types are not supported by current JavaScript version") - 08 convert to cleaner implementation (maybe Drie -- https://github.com/janvorisek/drie) -- .5 on ProjectView page, show immediate feedback when a gift is given (on list?) -- and consider the same for Home & Contacts pages -- .5 customize favicon -- 04 allow user to download claims, mine + ones I can see about me from others -- Do we want to combine first name & last name? -- Show a warning if both giver and recipient are the same (but still allow?) - - Release Minimum Viable Product : - 08 thorough testing for errors & edge cases - Turn off stats-world or ensure it's usable (eg. cannot zoom out too far and lose world, cannot screenshot). diff --git a/src/db/index.ts b/src/db/index.ts index 8091e5c8..d39ea5ec 100644 --- a/src/db/index.ts +++ b/src/db/index.ts @@ -28,12 +28,12 @@ type NonsensitiveTables = { * https://9to5answer.com/how-to-bypass-warning-unexpected-any-specify-a-different-type-typescript-eslint-no-explicit-any */ export type SensitiveDexie = BaseDexie & T; -export const accountsDB = new BaseDexie("KickStartAccounts") as SensitiveDexie; +export const accountsDB = new BaseDexie("TimeSafariAccounts") as SensitiveDexie; const SensitiveSchemas = Object.assign({}, AccountsSchema); export type NonsensitiveDexie = BaseDexie & T; -export const db = new BaseDexie("KickStart") as NonsensitiveDexie; +export const db = new BaseDexie("TimeSafari") as NonsensitiveDexie; const NonsensitiveSchemas = Object.assign({}, ContactsSchema, SettingsSchema); /** diff --git a/src/libs/crypto/index.ts b/src/libs/crypto/index.ts index fb75e201..b3600b46 100644 --- a/src/libs/crypto/index.ts +++ b/src/libs/crypto/index.ts @@ -7,6 +7,8 @@ import { HDNode } from "@ethersproject/hdnode"; import * as didJwt from "did-jwt"; import * as u8a from "uint8arrays"; +export const DEFAULT_ROOT_DERIVATION_PATH = "m/76798669'/0'/0'/0'"; + /** * * @@ -47,17 +49,17 @@ export const newIdentifier = ( */ export const deriveAddress = ( mnemonic: string, + derivationPath: string = DEFAULT_ROOT_DERIVATION_PATH, ): [string, string, string, string] => { - const UPORT_ROOT_DERIVATION_PATH = "m/7696500'/0'/0'/0'"; mnemonic = mnemonic.trim().toLowerCase(); const hdnode: HDNode = HDNode.fromMnemonic(mnemonic); - const rootNode: HDNode = hdnode.derivePath(UPORT_ROOT_DERIVATION_PATH); + const rootNode: HDNode = hdnode.derivePath(derivationPath); const privateHex = rootNode.privateKey.substring(2); // original starts with '0x' const publicHex = rootNode.publicKey.substring(2); // original starts with '0x' const address = rootNode.address; - return [address, privateHex, publicHex, UPORT_ROOT_DERIVATION_PATH]; + return [address, privateHex, publicHex, derivationPath]; }; /** diff --git a/src/router/index.ts b/src/router/index.ts index c524c1b7..7ce59c4e 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -91,6 +91,14 @@ const routes: Array = [ /* webpackChunkName: "import-account" */ "../views/ImportAccountView.vue" ), }, + { + path: "/import-derive", + name: "import-derive", + component: () => + import( + /* webpackChunkName: "import-derive" */ "../views/ImportDerivedAccountView.vue" + ), + }, { path: "/new-edit-account", name: "new-edit-account", diff --git a/src/views/ImportAccountView.vue b/src/views/ImportAccountView.vue index ae3f0ac5..52e93302 100644 --- a/src/views/ImportAccountView.vue +++ b/src/views/ImportAccountView.vue @@ -24,6 +24,24 @@ v-model="mnemonic" /> {{ mnemonic }} +

+ Advanced +

+
+ Enter a custom derivation path + + For previous uPort or Endorser users, + + click here to use that value. + +