diff --git a/README.md b/README.md index 01d4525b2d..8d15db56f4 100644 --- a/README.md +++ b/README.md @@ -33,12 +33,12 @@ When downloading from either location, check the URL bar of your browser to ensu ### Current Release -The most recent (v1.3.12) release can downloaded using these links: +The most recent (v1.3.13-test1) release can downloaded using these links: -- [Windows Installer](https://github.com/greymass/anchor/releases/download/v1.3.12/win-anchor-wallet-1.3.12.exe) -- [macOS Package](https://github.com/greymass/anchor/releases/download/v1.3.12/mac-anchor-wallet-1.3.12-x64.dmg) -- [Linux (deb)](https://github.com/greymass/anchor/releases/download/v1.3.12/linux-anchor-wallet-1.3.12-amd64.deb) -- [Linux (AppImage)](https://github.com/greymass/anchor/releases/download/v1.3.12/linux-anchor-wallet-1.3.12-x86_64.AppImage) +- [Windows Installer](https://github.com/greymass/anchor/releases/download/v1.3.13-test1/win-anchor-wallet-1.3.13-test1.exe) +- [macOS Package](https://github.com/greymass/anchor/releases/download/v1.3.13-test1/mac-anchor-wallet-1.3.13-test1-x64.dmg) +- [Linux (deb)](https://github.com/greymass/anchor/releases/download/v1.3.13-test1/linux-anchor-wallet-1.3.13-test1-amd64.deb) +- [Linux (AppImage)](https://github.com/greymass/anchor/releases/download/v1.3.13-test1/linux-anchor-wallet-1.3.13-test1-x86_64.AppImage) The latest release will always be available on the releases page of this repository: diff --git a/app/main/main.dev.js b/app/main/main.dev.js index 5bba43372b..da5f20c471 100644 --- a/app/main/main.dev.js +++ b/app/main/main.dev.js @@ -85,7 +85,7 @@ if (!lock) { uri.startsWith('esr-anchor:') || uri.startsWith('anchorcreate:') ) { - handleUri(resourcePath, store, mainWindow, pHandler, uri); + handleUri(mainWindow, pHandler, uri); } } else { showManager(); @@ -122,7 +122,7 @@ app.on('ready', async () => { if (uri) { if (uri.startsWith('esr') || uri.startsWith('anchorcreate')) { setTimeout(() => { - handleUri(resourcePath, store, mainWindow, pHandler, uri); + handleUri(mainWindow, pHandler, uri); }, 2000); } } @@ -134,7 +134,7 @@ app.on('activate', (e, hasVisibleWindows) => { app.on('open-url', (e, url) => { if (pHandler) { if (url.startsWith('esr') || url.startsWith('anchorcreate')) { - handleUri(resourcePath, store, mainWindow, pHandler, url); + handleUri(mainWindow, pHandler, url); } } else { uri = url; @@ -222,7 +222,8 @@ const initSessionManager = async () => { sHandler.manager.disconnect(); } // Create new Session Manager - sHandler = new SessionManager(store, pHandler); + const { sessions, settings } = store.getState(); + sHandler = new SessionManager(sessions, settings); // Connect the session manager sHandler.manager.connect(); // Release the lock @@ -322,7 +323,7 @@ function showHandler() { // Allow ESR Requests from the UI ipcMain.on('openUri', (event, data) => { - handleUri(resourcePath, store, mainWindow, pHandler, data); + handleUri(mainWindow, pHandler, data); }); // Session management IPC handlers @@ -430,3 +431,5 @@ global.setAlternativePayment = setAlternativePayment; global.initSessionManager = initSessionManager; global.initHardwareLedger = initHardwareLedger; global.showManager = showManager; +global.handleUri = data => handleUri(mainWindow, pHandler, data); +global.storeDispatch = data => store.dispatch(data); diff --git a/app/modules/main/electron/index.js b/app/modules/main/electron/index.js index eab0eb7f4e..afa8ab7767 100644 --- a/app/modules/main/electron/index.js +++ b/app/modules/main/electron/index.js @@ -11,7 +11,14 @@ const path = require('path'); let ui; -const createInterface = (resourcePath, route = '/', closable = true, store, uri = false, pHandler = false) => { +const createInterface = ( + resourcePath, + route = '/', + closable = true, + store, + uri = false, + pHandler = false +) => { log.info('wallet ui: creating'); const uiStateKeeper = windowStateKeeper(store); @@ -32,14 +39,14 @@ const createInterface = (resourcePath, route = '/', closable = true, store, uri nodeIntegration: true, contextIsolation: false, enableRemoteModule: true, - } + }, }); uiStateKeeper.track(ui); ui.loadURL(`file://${path.join(resourcePath, 'renderer/main/index.html')}#${route}`); - ui.on('page-title-updated', (e) => { + ui.on('page-title-updated', e => { e.preventDefault(); }); @@ -62,7 +69,7 @@ const createInterface = (resourcePath, route = '/', closable = true, store, uri } // Launch + Load URI, if exists if (uri && pHandler) { - handleUri(resourcePath, store, ui, pHandler, uri); + handleUri(ui, pHandler, uri); } }); diff --git a/app/package.json b/app/package.json index 13afb82073..44f9579b9c 100644 --- a/app/package.json +++ b/app/package.json @@ -1,7 +1,7 @@ { "name": "anchor-wallet", "productName": "Anchor Wallet", - "version": "1.3.12", + "version": "1.3.13-test1", "description": "An Antelope Light Wallet with simple tools for basic activities and advanced tools for power users.", "main": "./main.prod.js", "author": { diff --git a/app/renderer/assets/locales/de-DE/common.json b/app/renderer/assets/locales/de-DE/common.json index e8e1086028..7dff6a4cb9 100644 --- a/app/renderer/assets/locales/de-DE/common.json +++ b/app/renderer/assets/locales/de-DE/common.json @@ -1,7 +1,7 @@ { "account_authority": "Account/Authority", "application_name": "Anchor", - "application_version": "v1.3.12", + "application_version": "v1.3.13-test1", "back": "Back", "block_height": "Block Height", "blockchain": "Blockchain", diff --git a/app/renderer/assets/locales/el-GR/common.json b/app/renderer/assets/locales/el-GR/common.json index e8e1086028..7dff6a4cb9 100644 --- a/app/renderer/assets/locales/el-GR/common.json +++ b/app/renderer/assets/locales/el-GR/common.json @@ -1,7 +1,7 @@ { "account_authority": "Account/Authority", "application_name": "Anchor", - "application_version": "v1.3.12", + "application_version": "v1.3.13-test1", "back": "Back", "block_height": "Block Height", "blockchain": "Blockchain", diff --git a/app/renderer/assets/locales/en-US/common.json b/app/renderer/assets/locales/en-US/common.json index 7c34349dfb..3975aafe9c 100644 --- a/app/renderer/assets/locales/en-US/common.json +++ b/app/renderer/assets/locales/en-US/common.json @@ -1,7 +1,7 @@ { "account_authority": "Account/Authority", "application_name": "Anchor", - "application_version": "v1.3.12", + "application_version": "v1.3.13-test1", "back": "Back", "block_height": "Block Height", "blockchain": "Blockchain", diff --git a/app/renderer/assets/locales/en-US/global.json b/app/renderer/assets/locales/en-US/global.json index d3b93d53f0..bbb76e8fe6 100644 --- a/app/renderer/assets/locales/en-US/global.json +++ b/app/renderer/assets/locales/en-US/global.json @@ -93,7 +93,7 @@ "global_account_import_private_cold_wallet_header": "Cold Wallet", "global_account_import_private_cold_wallet_subheader": "A wallet designed to work on an offline computer acting as a cold storage device.", "global_account_import_private_description": "To import additional accounts, simply enter the private key. The app will convert it to a public key and lookup all accounts with relevant permissions.", - "global_account_import_private_key": "Private Key (51 characters and starts with the number 5)", + "global_account_import_private_key": "Private Key (starts with the number 5 or PVT_)", "global_account_import_private_requires_hash_button": "Setup Password", "global_account_import_private_requires_hash_description": "Please enter a password of your choosing and keep it safe. This password cannot be recovered and is not stored anywhere within the app.", "global_account_import_private_requires_hash_header": "No wallet password established.", @@ -306,7 +306,7 @@ "global_account_import_welcome_subheader_one": "Anchor will automatically query the {{connectionChain}} blockchains for accounts matching your known public keys.", "global_account_import_welcome_paragraph": "Scanning will be enabled after one key pair is saved.", "global_account_import_welcome_button_one": "Scan for Accounts", - "global_account_import_welcome_header_two":"Import an existing account", + "global_account_import_welcome_header_two": "Import an existing account", "global_account_import_welcome_subheader_two": "Configure Anchor to use existing accounts on this blockchain.", "global_account_import_welcome_button_two": "Import an existing Account", "global_account_import_welcome_header_three": "Create a new account", diff --git a/app/renderer/assets/locales/en-US/welcome.json b/app/renderer/assets/locales/en-US/welcome.json index 1db29d6066..4ebf4c7ab6 100644 --- a/app/renderer/assets/locales/en-US/welcome.json +++ b/app/renderer/assets/locales/en-US/welcome.json @@ -41,7 +41,7 @@ "welcome_key_coldwallet": "Import Private Key", "welcome_key_coldwallet_content": "A cold wallet cannot verify if the private key provided is matching the account.", "welcome_key_coldwallet_title": "Cold Wallet - Key Import", - "welcome_key_compare_content_text": "All EOSIO keys start with the number 5 and are 51 characters long.", + "welcome_key_compare_content_text": "All EOSIO keys start with the number 5 or PVT_.", "welcome_key_compare_expecting_match_to": "Expecting a private key that matches one of the below keys.", "welcome_key_compare_fail_invalid_content": "The private key you entered cannot be converted to a public key.", "welcome_key_compare_fail_invalid_title": "Private key invalid", @@ -49,7 +49,7 @@ "welcome_key_compare_fail_match_title": "Private key does not match", "welcome_key_compare_matches_content": "Key Match", "welcome_key_compare_matches_title": "The private key entered matches the public key on the accounts permissions.", - "welcome_key_compare_placeholder": "Begins with the number 5 and is 51 characters long", + "welcome_key_compare_placeholder": "Begins with the number 5 or PVT_", "welcome_key_compare_title": "Hint: Private Keys", "welcome_key_compare_visible": "Show private key", "welcome_key_sign_tx": "Enable wallet signing operations?", diff --git a/app/renderer/assets/locales/es-ES/common.json b/app/renderer/assets/locales/es-ES/common.json index 888f834dd6..20d059db4b 100644 --- a/app/renderer/assets/locales/es-ES/common.json +++ b/app/renderer/assets/locales/es-ES/common.json @@ -1,7 +1,7 @@ { "account_authority": "Account/Authority", "application_name": "Anchor", - "application_version": "v1.3.12", + "application_version": "v1.3.13-test1", "back": "Atrás", "block_height": "Altura del bloque", "blockchain": "Blockchain", diff --git a/app/renderer/assets/locales/et-EE/common.json b/app/renderer/assets/locales/et-EE/common.json index 7a87047136..42a7f0626a 100644 --- a/app/renderer/assets/locales/et-EE/common.json +++ b/app/renderer/assets/locales/et-EE/common.json @@ -1,7 +1,7 @@ { "account_authority": "Account/Authority", "application_name": "Anchor", - "application_version": "v1.3.12", + "application_version": "v1.3.13-test1", "back": "Tagasi", "block_height": "Ploki kõrgus", "blockchain": "Blockchain", diff --git a/app/renderer/assets/locales/fr-FR/common.json b/app/renderer/assets/locales/fr-FR/common.json index fcd416107b..0fe6c7cffa 100644 --- a/app/renderer/assets/locales/fr-FR/common.json +++ b/app/renderer/assets/locales/fr-FR/common.json @@ -1,7 +1,7 @@ { "account_authority": "Account/Authority", "application_name": "Anchor", - "application_version": "v1.3.12", + "application_version": "v1.3.13-test1", "back": "Back", "block_height": "Hauteur du Bloc", "blockchain": "Blockchain", diff --git a/app/renderer/assets/locales/id-ID/common.json b/app/renderer/assets/locales/id-ID/common.json index 682a661023..3b503f8c21 100644 --- a/app/renderer/assets/locales/id-ID/common.json +++ b/app/renderer/assets/locales/id-ID/common.json @@ -1,7 +1,7 @@ { "account_authority": "Account/Authority", "application_name": "Anchor", - "application_version": "v1.3.12", + "application_version": "v1.3.13-test1", "back": "Kembali", "block_height": "Tinggi Block", "blockchain": "Blockchain", diff --git a/app/renderer/assets/locales/it-IT/common.json b/app/renderer/assets/locales/it-IT/common.json index b7687699f8..fb44d3f262 100644 --- a/app/renderer/assets/locales/it-IT/common.json +++ b/app/renderer/assets/locales/it-IT/common.json @@ -1,7 +1,7 @@ { "account_authority": "Account/Authority", "application_name": "Anchor", - "application_version": "v1.3.12", + "application_version": "v1.3.13-test1", "back": "Back", "block_height": "Numero di Blocco", "blockchain": "Blockchain", diff --git a/app/renderer/assets/locales/ja-JP/common.json b/app/renderer/assets/locales/ja-JP/common.json index 3a95f925a1..b209e0d465 100644 --- a/app/renderer/assets/locales/ja-JP/common.json +++ b/app/renderer/assets/locales/ja-JP/common.json @@ -1,7 +1,7 @@ { "account_authority": "Account/Authority", "application_name": "Anchor", - "application_version": "v1.3.12", + "application_version": "v1.3.13-test1", "back": "戻る", "block_height": "ブロック高", "blockchain": "Blockchain", diff --git a/app/renderer/assets/locales/ko-KR/common.json b/app/renderer/assets/locales/ko-KR/common.json index ba685c08d1..ad6218ace5 100755 --- a/app/renderer/assets/locales/ko-KR/common.json +++ b/app/renderer/assets/locales/ko-KR/common.json @@ -1,7 +1,7 @@ { "account_authority": "Account/Authority", "application_name": "Anchor", - "application_version": "v1.3.12", + "application_version": "v1.3.13-test1", "back": "뒤로", "block_height": "블록 높이", "blockchain": "Blockchain", diff --git a/app/renderer/assets/locales/ru-RU/common.json b/app/renderer/assets/locales/ru-RU/common.json index f56075e3f9..4614133226 100644 --- a/app/renderer/assets/locales/ru-RU/common.json +++ b/app/renderer/assets/locales/ru-RU/common.json @@ -1,7 +1,7 @@ { "account_authority": "Account/Authority", "application_name": "Настольное приложение для блокцепи EOS (Anchor)", - "application_version": "v1.3.12", + "application_version": "v1.3.13-test1", "back": "Back", "block_height": "Номер Блока", "blockchain": "Blockchain", diff --git a/app/renderer/assets/locales/zh-CN/common.json b/app/renderer/assets/locales/zh-CN/common.json index 67a314cf1a..e859c49d68 100755 --- a/app/renderer/assets/locales/zh-CN/common.json +++ b/app/renderer/assets/locales/zh-CN/common.json @@ -1,7 +1,7 @@ { "account_authority": "Account/Authority", "application_name": "Anchor", - "application_version": "v1.3.12", + "application_version": "v1.3.13-test1", "back": "Back", "block_height": "区块高度", "blockchain": "Blockchain", diff --git a/app/shared/components/Tools/Keys.js b/app/shared/components/Tools/Keys.js index a8500ca900..7806088e27 100644 --- a/app/shared/components/Tools/Keys.js +++ b/app/shared/components/Tools/Keys.js @@ -16,7 +16,7 @@ import { Modal, Popup, Segment, - Table + Table, } from 'semantic-ui-react'; import ReactJson from 'react-json-view'; @@ -43,9 +43,9 @@ class ToolsKeys extends Component { super(props); this.state = Object.assign({}, defaultState); } - onCancelConfirm = () => this.setState({ confirm: false }) - onRemoveConfirm = (pubkey) => this.setState({ confirmRemove: pubkey }) - onRemoveCancel = () => this.setState({ confirmRemove: false }) + onCancelConfirm = () => this.setState({ confirm: false }); + onRemoveConfirm = pubkey => this.setState({ confirmRemove: pubkey }); + onRemoveCancel = () => this.setState({ confirmRemove: false }); onClose = () => { if (this.state.closable) { this.setState({ open: false }); @@ -53,141 +53,116 @@ class ToolsKeys extends Component { if (!this.state.closable) { this.setState({ confirm: true }); } - } - onCloseImport = () => this.setState({ openImport: false }) - onForceClose = () => this.setState({ confirm: false, open: false }) - onKeypair = (pubkey) => { + }; + onCloseImport = () => this.setState({ openImport: false }); + onForceClose = () => this.setState({ confirm: false, open: false }); + onKeypair = pubkey => { const { pubkeys } = this.state; this.setState({ closable: false, - pubkeys: [ - ...pubkeys, - pubkey, - ] + pubkeys: [...pubkeys, pubkey], }); - } - onOpen = () => this.setState({ open: true }) - onOpenImport = () => this.setState({ openImport: true }) - onHideKey = () => this.setState({ openKey: false }) - onShowKey = (pubkey) => this.setState({ openKey: pubkey }) - onSave = () => this.setState({ closable: true }) + }; + onOpen = () => this.setState({ open: true }); + onOpenImport = () => this.setState({ openImport: true }); + onHideKey = () => this.setState({ openKey: false }); + onShowKey = pubkey => this.setState({ openKey: pubkey }); + onSave = () => this.setState({ closable: true }); onRemoveKey = (password, pubkey) => { const { actions } = this.props; actions.removeKeyFromStorageByPublic(password, pubkey); this.setState({ confirmRemove: false }); - } - filterKeys = (e, { value }) => this.setState({ searchFilter: value }) - toggleLegacy = (e, { checked }) => this.setState({ legacy: checked }) + }; + filterKeys = (e, { value }) => this.setState({ searchFilter: value }); + toggleLegacy = (e, { checked }) => this.setState({ legacy: checked }); render() { - const { - paths, - pubkeys, - t, - settings, - validate, - wallet, - wallets, - } = this.props; - const { - confirmRemove, - legacy, - openKey, - searchFilter, - } = this.state; + const { paths, pubkeys, t, settings, validate, wallet, wallets } = this.props; + const { confirmRemove, legacy, openKey, searchFilter } = this.state; let filtered = [...pubkeys.available]; if (searchFilter !== '') { - filtered = [...pubkeys.available].filter(k => k.toLowerCase().includes(searchFilter.toLowerCase())); + try { + filtered = [...pubkeys.available].filter(k => + PublicKey.from(k).equals(PublicKey.from(searchFilter)) + ); + } catch (e) { + filtered = []; + } } return ( - {(openKey) - ? ( - - ) - : false - } - {(confirmRemove) - ? ( - this.onRemoveCancel()} - open={confirmRemove} - size="tiny" - > - {t('global:global_account_key_remove_confirm_title')} - - -
{t('global:global_account_key_remove_confirm_header')}
-

{t('global:global_account_key_remove_confirm_desc')}

-

{confirmRemove}

-
-
- - - this.onRemoveKey(password, confirmRemove)} - settings={settings} - trigger={( - + this.onRemoveKey(password, confirmRemove)} + settings={settings} + trigger={ +