diff --git a/CHANGELOG.md b/CHANGELOG.md index 5e4aece4..9fe07342 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## Version 2.6.1 + + - Added post-launch opt-in check NIS keys + ## Version 2.6.0 - Added post-launch opt-in process diff --git a/package.json b/package.json index a0e02e4b..d99113f8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "NEM-Wallet", - "version": "2.6.0", + "version": "2.6.1", "description": "Cross-platform lite wallet for NEM", "author": "https://github.com/QuantumMechanics ", "license": "MIT", diff --git a/src/app/config/app.constants.js b/src/app/config/app.constants.js index 60af3714..8d15a880 100644 --- a/src/app/config/app.constants.js +++ b/src/app/config/app.constants.js @@ -2,7 +2,7 @@ const AppConstants = { //Application name appName: 'NEM Wallet', - version: '2.6.0', + version: '2.6.1', //Network defaultNetwork: 104, diff --git a/src/app/modules/catapultOptin/catapultOptin/catapultOptin.controller.js b/src/app/modules/catapultOptin/catapultOptin/catapultOptin.controller.js index be427d0e..18babc09 100755 --- a/src/app/modules/catapultOptin/catapultOptin/catapultOptin.controller.js +++ b/src/app/modules/catapultOptin/catapultOptin/catapultOptin.controller.js @@ -80,11 +80,14 @@ class NormalOptInCtrl { this.formData.password = ""; this.formData.confirmPassword = ""; this.formData.acceptPrivacy = false; + this.formData.addressConfirmed = false; this.statusLoading = true; this.isOptedIn = false; this.formData.selectedAccount = this._DataStore.account.metaData.account; this.isMultisig = false; this.hasCosignatorySigned = true; + this.isConfirmAddressModalShown = false; + this.publicKeyError = false; } /** @@ -167,10 +170,22 @@ class NormalOptInCtrl { try { if (this.multisigDestinationPublicKey.length !== 64) { this.multisigDestinationAddress = null; + this.publicKeyError = false; } else { - this.multisigDestinationAddress = PublicAccount.createFromPublicKey(this.multisigDestinationPublicKey, this.catapultNetwork).address.pretty(); + this._CatapultOptin.checkIfNIS1PublicKeyOrPrivateKey(this.multisigDestinationPublicKey).then(result => { + this._$timeout(() => { + if (result) { + this.multisigDestinationAddress = PublicAccount.createFromPublicKey(this.multisigDestinationPublicKey, this.catapultNetwork).address.pretty(); + this.publicKeyError = false; + } else { + this.multisigDestinationAddress = null; + this.publicKeyError = true; + } + }); + }); } } catch (e) { + this.publicKeyError = false; this.multisigDestinationAddress = null; } } @@ -192,11 +207,23 @@ class NormalOptInCtrl { try { if (this.optinPublicKey.length !== 64) { this.optinAccount = null; + this.publicKeyError = false; } else { - this.optinAccount = PublicAccount.createFromPublicKey(this.optinPublicKey, this.catapultNetwork); + this._CatapultOptin.checkIfNIS1PublicKeyOrPrivateKey(this.optinPublicKey).then(result => { + this._$timeout(() => { + if (result) { + this.optinAccount = PublicAccount.createFromPublicKey(this.optinPublicKey, this.catapultNetwork); + this.publicKeyError = false; + } else { + this.optinAccount = null; + this.publicKeyError = true; + } + }); + }); } } catch (e) { this.optinAccount = null; + this.publicKeyError = false; } } @@ -219,42 +246,54 @@ class NormalOptInCtrl { } } + /** + * Shows Symbol Address confirmation modal + */ + showConfirmAddressModal() { + this.formData.addressConfirmed = false; + + if (this._Wallet.decrypt(this.common)) + this.isConfirmAddressModalShown = true; + } + + /** + * Hides Symbol Address confirmation modal + */ + hideConfirmAddressModal() { + this.isConfirmAddressModalShown = false; + } + + /** * Sends optin simple or multisig account by a valid form */ send() { + this.isConfirmAddressModalShown = false; if (this._Wallet.decrypt(this.common)) { - if (this._DataStore.account.metaData.account.balance < this.fee) { - this._$timeout(() => { - this._Alert.insufficientBalance(); - }); - } - else { - this.step = 0; - this.statusLoading = true; - this._$timeout(() => { - if (!this.isMultisig) { - this._CatapultOptin.sendSimpleOptin(this.common, this.optinPublicKey).then(result => { - this.checkOptinStatus(this.formData.selectedAccount.address); - this.optinAccount = null; - this.optinPublicKey = ''; - }).catch(e => { - // this - }); - } else { - this._CatapultOptin.sendMultisigOptin(this.common, this.formData.selectedAccount.publicKey, this.multisigDestinationPublicKey).then(result => { - this.checkOptinStatus(this.formData.selectedAccount.address); - this.onMultisigSelectorChange(); - this.optinAccount = null; - this.optinPublicKey = ''; - this.multisigDestinationPublicKey = ''; - this.multisigDestinationAddress = ''; - }).catch(e => { - // this - }); - } - }); - } + this.step = 0; + this.statusLoading = true; + this._$timeout(() => { + if (!this.isMultisig) { + this._CatapultOptin.sendSimpleOptin(this.common, this.optinPublicKey).then(result => { + this.checkOptinStatus(this.formData.selectedAccount.address); + this.optinAccount = null; + this.optinPublicKey = ''; + }).catch(e => { + // this + }); + } else { + this._CatapultOptin.sendMultisigOptin(this.common, this.formData.selectedAccount.publicKey, this.multisigDestinationPublicKey).then(result => { + this.checkOptinStatus(this.formData.selectedAccount.address); + this.onMultisigSelectorChange(); + this.optinAccount = null; + this.optinPublicKey = ''; + this.multisigDestinationPublicKey = ''; + this.multisigDestinationAddress = ''; + }).catch(e => { + // this + }); + } + }); } this.common.password = ''; this.formData.acceptTerms = false; diff --git a/src/app/modules/catapultOptin/catapultOptin/catapultOptin.html b/src/app/modules/catapultOptin/catapultOptin/catapultOptin.html index e2633f57..4d7e7347 100755 --- a/src/app/modules/catapultOptin/catapultOptin/catapultOptin.html +++ b/src/app/modules/catapultOptin/catapultOptin/catapultOptin.html @@ -120,6 +120,7 @@

{{'CATAPULTOPTIN_ACCOUNT_UNLOCK' | translate}}

{{'POST_OPTIN_DEST_MSIG' | translate}}

+

{{'OPTIN_NIS1_PUBLIC_KEY' | translate}}

{{'POST_OPTIN_DEST_MSIG_ADDRESS' | translate}}

@@ -129,6 +130,7 @@

{{'CATAPULTOPTIN_ACCOUNT_UNLOCK' | translate}}

{{'CATAPULTOPTIN_ACCOUNT_UNLOCK' | translate}}

+

{{'OPTIN_NIS1_PUBLIC_KEY' | translate}}

{{'YOUR_SYMBOL_ADDRESS' | translate}}

@@ -137,10 +139,10 @@

{{'CATAPULTOPTIN_ACCOUNT_UNLOCK' | translate}}

- +
- +
@@ -153,7 +155,7 @@

{{'CATAPULTOPTIN_ACCOUNT_UNLOCK' | translate}}

{{'CATAPULTOPTIN_REVIEW_NORMAL_RESULT' | translate}}

-
+
@@ -199,12 +201,68 @@

{{'CATAPULTOPTIN_REVIEW_NORMAL_RESULT' | translate}}<

+ + +
+
+ +
+
+ +
+ +
+
+

{{'POST_OPTIN_CONFIRM_MODAL_TITLE' | translate}}

+
+
+ {{'POST_OPTIN_CONFIRM_MODAL_TEXT' | translate}} +
+
+ {{'POST_OPTIN_CONFIRM_MODAL_TEXT_MULTISIG' | translate}} +
+
+
+

{{'POST_OPTIN_DEST_ADDRESS' | translate}}

+ +
+
+

{{'POST_OPTIN_DEST_MULTISIG_ADDRESS' | translate}}

+ +
+
+
+ + +
+
+
+
+ +
+
+ +
+
+
+
+
+
+
diff --git a/src/app/modules/languages/cn.js b/src/app/modules/languages/cn.js index 65685d75..e83b9636 100644 --- a/src/app/modules/languages/cn.js +++ b/src/app/modules/languages/cn.js @@ -987,6 +987,12 @@ function ChineseProvider($translateProvider) { OPTIN_NOT_AVAILABLE: '您的快照模块上没有足够的余额, 亦或者您已在发布前选择加入。', OPTIN_PUBLICKEY_PLACEHOLDER: '公钥只能是64位的Hex字符串', OPTIN_DONE: '完成', + POST_OPTIN_CONFIRM_MODAL_TITLE: '注意!', + POST_OPTIN_CONFIRM_MODAL_TEXT: "请确认 Symbol 目标地址是您的 Symbol 帐户地址。您可以在 Symbol Wallet 主屏幕中找到您的 Symbol 帐户地址。如果不匹配,请重新开始该过程并提供您拥有的帐户的有效Symbol公钥。", + POST_OPTIN_CONFIRM_MODAL_CHECKBOX: "我确认Symbol目标地址与我的Symbol帐户地址匹配", + POST_OPTIN_CONFIRM_MODAL_TEXT_MULTISIG: "请确认 Symbol 目标地址是您的 Symbol 多重签名帐户地址。如果不匹配,请重新开始该过程并提供多重签名帐户的有效Symbol公钥。", + POST_OPTIN_CONFIRM_MODAL_CHECKBOX_MULTISIG: "我确认 Symbol 目标地址与 Symbol 多重签名帐户地址匹配", + OPTIN_NIS1_PUBLIC_KEY: '您输入的公钥是 NIS1 密钥!您需要输入一个Symbol公钥。' }); } diff --git a/src/app/modules/languages/de.js b/src/app/modules/languages/de.js index 1bfcd176..eba37f8c 100644 --- a/src/app/modules/languages/de.js +++ b/src/app/modules/languages/de.js @@ -992,8 +992,13 @@ function GermanProvider($translateProvider) { OPTIN_SYMBOL_READY: 'Your Symbol account is ready', OPTIN_COPY_SUCCESS: 'Copied!', OPTIN_TYPE_SELECT: 'Select the way you opted in this wallet', - CATAPULT_OPT_IN_ERROR_TOO_MUCH_COSIGNATORIES: 'This account has more than 8 cosignatories. Opt In protocol only allows multisig accounts with less than 9 cosignatories' - + CATAPULT_OPT_IN_ERROR_TOO_MUCH_COSIGNATORIES: 'This account has more than 8 cosignatories. Opt In protocol only allows multisig accounts with less than 9 cosignatories', + POST_OPTIN_CONFIRM_MODAL_TITLE: "Warning!", + POST_OPTIN_CONFIRM_MODAL_TEXT: "Please verify that the Symbol destination address is your Symbol account address. You can find your Symbol account address in your Symbol Wallet home screen. If it doesn’t match, please start the process again and provide a valid Symbol public key of the account that you own.", + POST_OPTIN_CONFIRM_MODAL_CHECKBOX: "I confirm that the Symbol destination address matches my Symbol account address", + POST_OPTIN_CONFIRM_MODAL_TEXT_MULTISIG: "Please verify that the Symbol destination address is your Symbol multisig account address. If it doesn’t match, please start the process again and provide a valid Symbol public key of the multisig account.", + POST_OPTIN_CONFIRM_MODAL_CHECKBOX_MULTISIG: "I confirm that the Symbol destination address matches the Symbol multisig account address", + OPTIN_NIS1_PUBLIC_KEY: 'The public key you entered is a NIS1 key! You need to enter a Symbol public key.' }); } diff --git a/src/app/modules/languages/en.js b/src/app/modules/languages/en.js index eb82d97b..682b8d34 100644 --- a/src/app/modules/languages/en.js +++ b/src/app/modules/languages/en.js @@ -1043,6 +1043,12 @@ function EnglishProvider($translateProvider) { OPTIN_NOT_AVAILABLE: 'You didn\'t have enough XEM in Snapshot or you already claimed them in a pre-launch opt-in.', OPTIN_PUBLICKEY_PLACEHOLDER: 'Public key must be 64 hexadecimal characters long.', OPTIN_SIGNED: 'Signed', + POST_OPTIN_CONFIRM_MODAL_TITLE: "Warning!", + POST_OPTIN_CONFIRM_MODAL_TEXT: "Please verify that the Symbol destination address is your Symbol account address. You can find your Symbol account address in your Symbol Wallet home screen. If it doesn’t match, please start the process again and provide a valid Symbol public key of the account that you own.", + POST_OPTIN_CONFIRM_MODAL_CHECKBOX: "I confirm that the Symbol destination address matches my Symbol account address", + POST_OPTIN_CONFIRM_MODAL_TEXT_MULTISIG: "Please verify that the Symbol destination address is your Symbol multisig account address. If it doesn’t match, please start the process again and provide a valid Symbol public key of the multisig account.", + POST_OPTIN_CONFIRM_MODAL_CHECKBOX_MULTISIG: "I confirm that the Symbol destination address matches the Symbol multisig account address", + OPTIN_NIS1_PUBLIC_KEY: 'The public key you entered is a NIS1 key! You need to enter a Symbol public key.' }); } diff --git a/src/app/modules/languages/es.js b/src/app/modules/languages/es.js index ecf5ae47..a6a9d877 100644 --- a/src/app/modules/languages/es.js +++ b/src/app/modules/languages/es.js @@ -972,6 +972,13 @@ function SpanishProvider($translateProvider) { OPTIN_ERROR_TITLE_1: 'El opt-in hecho anteriormente ha fallado por que la cuenta destino no era valida.', OPTIN_ERROR_TITLE_2: 'Esta opt-in request ha fallado por que uno o mas cofirmantes no eran validos.', OPTIN_SIGNED: 'Firmado', + POST_OPTIN_CONFIRM_MODAL_TITLE: 'Atención!', + POST_OPTIN_CONFIRM_MODAL_TEXT: 'Por favor verifica que la dirección de Symbol destino es la misma dirección que tu cuenta de Symbol. Puedes encontrar la dirección de tu cuenta de Symbol en la página de inicio de tu billetera de Symbol. Si no son la misma, por favor empieza el proceso de nuevo y entra una llave publica de Symbol valida para tu cuenta!', + POST_OPTIN_CONFIRM_MODAL_CHECKBOX: 'Confirmo que la dirección de Symbol destino es la misma que la dirección de mi cuenta de Symbol', + OPTIN_NIS1_PUBLIC_KEY: 'La llave publica que has entrado es una llave de NIS1! Debes poner una llave publica de Symbol', + POST_OPTIN_ERROR_INVALID_KEY: 'Llave inválida', + POST_OPTIN_CONFIRM_MODAL_TEXT_MULTISIG: "Por favor verifica que la dirección destino de Symbol coincide con la de tu dirección multisig. Si no coinciden, por favor inicia el proceso de nuevo e introduce la llave pública válida de la cuenta multisig.", + POST_OPTIN_CONFIRM_MODAL_CHECKBOX_MULTISIG: "Confirmo que la dirección destino de Symbol coincide con la dirección de mi cuenta multisig.", }); } diff --git a/src/app/modules/languages/it.js b/src/app/modules/languages/it.js index 73295fd7..7ae63626 100644 --- a/src/app/modules/languages/it.js +++ b/src/app/modules/languages/it.js @@ -933,8 +933,14 @@ function ItalianProvider($translateProvider) { OPTIN_SYMBOL_READY: 'il tuo account Symbol è pronto', OPTIN_COPY_SUCCESS: 'Copied!', OPTIN_TYPE_SELECT: 'Select the way you opted in this wallet', - CATAPULT_OPT_IN_ERROR_TOO_MUCH_COSIGNATORIES: 'This account has more than 8 cosignatories. Opt In protocol only allows multisig accounts with less than 9 cosignatories' - + CATAPULT_OPT_IN_ERROR_TOO_MUCH_COSIGNATORIES: 'This account has more than 8 cosignatories. Opt In protocol only allows multisig accounts with less than 9 cosignatories', + POST_OPTIN_CONFIRM_MODAL_TITLE: 'Attenzione!', + POST_OPTIN_CONFIRM_MODAL_TEXT: 'Verifica che l\'indirizzo di destinazione di Symbol sia l\'indirizzo del tuo account Symbol. Puoi trovare l\'indirizzo del tuo account Symbol nella schermata iniziale del tuo wallet Symbol. Se non corrisponde, riavvia la procedura e fornisci una chiave pubblica valida per l\'account di tua proprietà.', + POST_OPTIN_CONFIRM_MODAL_CHECKBOX: 'Confermo che l\'indirizzo di destinazione Symbol corrisponde all\'indirizzo del mio account Symbol.', + OPTIN_NIS1_PUBLIC_KEY: 'La chiave pubblica che hai inserito è una chiave NIS1! Devi inserire una chiave pubblica Symbol.', + POST_OPTIN_ERROR_INVALID_KEY: ' Chiave non valida', + POST_OPTIN_CONFIRM_MODAL_TEXT_MULTISIG: "Please verify that the Symbol destination address is your Symbol multisig account address. If it doesn’t match, please start the process again and provide a valid Symbol public key of the multisig account.", + POST_OPTIN_CONFIRM_MODAL_CHECKBOX_MULTISIG: "I confirm that the Symbol destination address matches the Symbol multisig account address", }); } diff --git a/src/app/modules/languages/jp.js b/src/app/modules/languages/jp.js index dbfa1291..b544ab68 100644 --- a/src/app/modules/languages/jp.js +++ b/src/app/modules/languages/jp.js @@ -1049,6 +1049,13 @@ function JapaneseProvider($translateProvider) { OPTIN_ERROR_TITLE_2: '1名または複数の連署者が有効でないため、このオプトインリクエストは失敗しました。', OPTIN_SIGNED: '署名済み', OPTIN_TAC_READ_ACCEPT_POST: 'を読んだ上で承諾します。', + POST_OPTIN_CONFIRM_MODAL_TITLE: '注意!', + POST_OPTIN_CONFIRM_MODAL_TEXT: '"Symbolの送信先アドレスがあなたのSymbolアカウントのアドレスであることを確認してください。', + POST_OPTIN_CONFIRM_MODAL_CHECKBOX: 'Symbolアカウントのアドレスは、Symbolウォレットのホーム画面で確認できます。', + OPTIN_NIS1_PUBLIC_KEY: '一致しない場合は、再度手続きを開始し、あなたが所有するアカウントの有効なSymbol公開鍵を入力してください。"', + POST_OPTIN_ERROR_INVALID_KEY: 'Symbolの送付先アドレスが、私のSymbolアカウントのアドレスと一致していることを確認します。', + POST_OPTIN_CONFIRM_MODAL_TEXT_MULTISIG: 'Symbolの送信先アドレスが、Symbolのマルチシグアカウントのアドレスであることを確認してください。一致しない場合は、もう一度やり直してください。マルチシグアカウントの有効な公開鍵を入力してください。', + POST_OPTIN_CONFIRM_MODAL_CHECKBOX_MULTISIG: 'Symbolの送付先アドレスが、Symbolのマルチシグアカウントのアドレスと一致することを確認しました。' }); } diff --git a/src/app/modules/languages/nl.js b/src/app/modules/languages/nl.js index a697ac59..4b755274 100644 --- a/src/app/modules/languages/nl.js +++ b/src/app/modules/languages/nl.js @@ -998,8 +998,13 @@ function DutchProvider($translateProvider) { OPTIN_SYMBOL_READY: 'Your Symbol account is ready', OPTIN_COPY_SUCCESS: 'Copied!', OPTIN_TYPE_SELECT: 'Select the way you opted in this wallet', - CATAPULT_OPT_IN_ERROR_TOO_MUCH_COSIGNATORIES: 'This account has more than 8 cosignatories. Opt In protocol only allows multisig accounts with less than 9 cosignatories' - + CATAPULT_OPT_IN_ERROR_TOO_MUCH_COSIGNATORIES: 'This account has more than 8 cosignatories. Opt In protocol only allows multisig accounts with less than 9 cosignatories', + POST_OPTIN_CONFIRM_MODAL_TITLE: "Warning!", + POST_OPTIN_CONFIRM_MODAL_TEXT: "Please verify that the Symbol destination address is your Symbol account address. You can find your Symbol account address in your Symbol Wallet home screen. If it doesn’t match, please start the process again and provide a valid Symbol public key of the account that you own.", + POST_OPTIN_CONFIRM_MODAL_CHECKBOX: "I confirm that the Symbol destination address matches my Symbol account address", + POST_OPTIN_CONFIRM_MODAL_TEXT_MULTISIG: "Please verify that the Symbol destination address is your Symbol multisig account address. If it doesn’t match, please start the process again and provide a valid Symbol public key of the multisig account.", + POST_OPTIN_CONFIRM_MODAL_CHECKBOX_MULTISIG: "I confirm that the Symbol destination address matches the Symbol multisig account address", + OPTIN_NIS1_PUBLIC_KEY: 'The public key you entered is a NIS1 key! You need to enter a Symbol public key.' }); } diff --git a/src/app/modules/languages/pl.js b/src/app/modules/languages/pl.js index 93186b1b..28441080 100644 --- a/src/app/modules/languages/pl.js +++ b/src/app/modules/languages/pl.js @@ -985,6 +985,7 @@ function PolishProvider($translateProvider) { OPTIN_TAC_INFO_1:'The Opt-in process is a feature launched by Symbol Chain Limited with the aim of helping NIS1 users migrate their balances to their new Symbol network. It is a process defined under certain parameters that all users who adhere to it have to comply with.', OPTIN_TAC_INFO_2:'Symbol Chain Limited will not be liable for any incidents outside of the terms and conditions specified below.', OPTIN_TAC_READ_ACCEPT: 'I have read and accept the ', + OPTIN_TAC_READ_ACCEPT_POST: ' ', OPTIN_CONFIRM_TITLE:'Confirm Symbol Opt-in', OPTIN_CONFIRM_INFO:'We are almost done! This will be the information that will be migrated to the new Symbol chain. Review it carefully and sign with your NEM key to finish your Opt-in.', OPTIN_CONFIRM_OPTIN:'Confirm Opt-in', @@ -1040,6 +1041,13 @@ function PolishProvider($translateProvider) { OPTIN_ERROR_TITLE_1: 'Ta prośba opt-in nie powiodła się ponieważ konto docelowe nie jest poprawne', OPTIN_ERROR_TITLE_2: 'Ta prośba opt-in nie powiodła się ponieważ jeden lub więcej sygnatariuszy nie było poprawnych.', OPTIN_SIGNED: 'Podpisano', + POST_OPTIN_CONFIRM_MODAL_TITLE: 'Uwaga!', + POST_OPTIN_CONFIRM_MODAL_TEXT: 'Zweryfikuj, że zaprezentowany docelowy adres Symbol jest Twoim adresem. Twój adres Symbol możesz znaleźć w Twoim portfelu Symbol na głównym ekranie. Jeśli adresy nie są takie same zacznij proces od początku i wprowadź poprawny klucz publiczny Twojego konta Symbol.', + POST_OPTIN_CONFIRM_MODAL_CHECKBOX: 'Potwierdzam, że prezentowany adres do wypłaty w sieci Symbol zgadza się z moim adresem Symbol.', + OPTIN_NIS1_PUBLIC_KEY: 'Klucz publiczny, który wprowadziłeś to klucz z sieci NIS1. Wprowadź klucz publiczny sieci Symbol.', + POST_OPTIN_ERROR_INVALID_KEY: 'Niepoprawny klucz', + POST_OPTIN_CONFIRM_MODAL_TEXT_MULTISIG: "Zweryfikuj, że zaprezentowany docelowy adres Symbol jest Twoim adresem z multipodpisem. Jeśli adresy nie są takie same zacznij proces od początku i wprowadź poprawny klucz publiczny Twojego konta Symbol z multipodpisem.", + POST_OPTIN_CONFIRM_MODAL_CHECKBOX_MULTISIG: "Potwierdzam, że prezentowany adres do wypłaty w sieci Symbol zgadza się z moim adresem konta Symbol z multipodpisem.", }); } diff --git a/src/app/modules/languages/ptbr.js b/src/app/modules/languages/ptbr.js index e3c4a09c..517a5f61 100644 --- a/src/app/modules/languages/ptbr.js +++ b/src/app/modules/languages/ptbr.js @@ -987,7 +987,13 @@ function PortugueseBRProvider($translateProvider) { OPTIN_SYMBOL_READY: 'Your Symbol account is ready', OPTIN_COPY_SUCCESS: 'Copied!', OPTIN_TYPE_SELECT: 'Select the way you opted in this wallet', - CATAPULT_OPT_IN_ERROR_TOO_MUCH_COSIGNATORIES: 'This account has more than 8 cosignatories. Opt In protocol only allows multisig accounts with less than 9 cosignatories' + CATAPULT_OPT_IN_ERROR_TOO_MUCH_COSIGNATORIES: 'This account has more than 8 cosignatories. Opt In protocol only allows multisig accounts with less than 9 cosignatories', + POST_OPTIN_CONFIRM_MODAL_TITLE: "Warning!", + POST_OPTIN_CONFIRM_MODAL_TEXT: "Please verify that the Symbol destination address is your Symbol account address. You can find your Symbol account address in your Symbol Wallet home screen. If it doesn’t match, please start the process again and provide a valid Symbol public key of the account that you own.", + POST_OPTIN_CONFIRM_MODAL_CHECKBOX: "I confirm that the Symbol destination address matches my Symbol account address", + POST_OPTIN_CONFIRM_MODAL_TEXT_MULTISIG: "Please verify that the Symbol destination address is your Symbol multisig account address. If it doesn’t match, please start the process again and provide a valid Symbol public key of the multisig account.", + POST_OPTIN_CONFIRM_MODAL_CHECKBOX_MULTISIG: "I confirm that the Symbol destination address matches the Symbol multisig account address", + OPTIN_NIS1_PUBLIC_KEY: 'The public key you entered is a NIS1 key! You need to enter a Symbol public key.' }); diff --git a/src/app/modules/languages/ru.js b/src/app/modules/languages/ru.js index 192534be..bd0c9f2d 100644 --- a/src/app/modules/languages/ru.js +++ b/src/app/modules/languages/ru.js @@ -926,6 +926,7 @@ function RussianProvider($translateProvider) { OPTIN_TAC_INFO_1:'Процесс Опт Ин - это функция, которая запущенна от Symbol Chain Limited с целью помочь пользователям сети NIS1 отзеркалить свои балансы в новую сеть Symbol. Данный процесс, содержит определенные правила, которые должны строго соблюдаться всеми участниками, которые его выполняют.', OPTIN_TAC_INFO_2:'Компания Symbol Chain Limited не будет нести ответственность, за любые инциденты, выходящие за рамки условий, указанных ниже.', OPTIN_TAC_READ_ACCEPT: 'Я прочитал и принимаю ', + OPTIN_TAC_READ_ACCEPT_POST: ' ', OPTIN_CONFIRM_TITLE:'Подтверждаю Symbol Опт Ин', OPTIN_CONFIRM_INFO:'Мы почти закончили! Данные будут мигрированы в новую блокчейн сеть Symbol. Внимательно просмотрите данные и подпишите вашим NEM ключом, чтобы завершить процедуру Опт Ин.', OPTIN_CONFIRM_OPTIN:'Подтвердить процесс Опт Ин', @@ -938,8 +939,14 @@ function RussianProvider($translateProvider) { OPTIN_SYMBOL_READY: 'Ваш Symbol аккаунт успешно создан', OPTIN_COPY_SUCCESS: 'Copied!', OPTIN_TYPE_SELECT: 'Выберите способ, с помощью которого вы произвели опт-ин процесс, в этом кошельке', - CATAPULT_OPT_IN_ERROR_TOO_MUCH_COSIGNATORIES: 'У этого аккаунта более 8 подписантов. Протокол Opt In позволяет использовать мультисиг аккаунты не более чем с 9 подписантами.' - + CATAPULT_OPT_IN_ERROR_TOO_MUCH_COSIGNATORIES: 'У этого аккаунта более 8 подписантов. Протокол Opt In позволяет использовать мультисиг аккаунты не более чем с 9 подписантами.', + POST_OPTIN_CONFIRM_MODAL_TITLE: 'Внимание!', + POST_OPTIN_CONFIRM_MODAL_TEXT: 'Убедитесь, что адрес назначения Symbol - это адрес вашего аккаунта Symbol. Адрес своего аккаунта Symbol можно найти на главном экране кошелька Symbol. Если они не совпадают, пожалуйста, запустите процесс снова и предоставьте действительный открытый ключ аккаунта Symbol, которым Вы владеете!', + POST_OPTIN_CONFIRM_MODAL_CHECKBOX: 'Я подтверждаю, что адрес назначения совпадает с адресом моего аккаунта Symbol', + OPTIN_NIS1_PUBLIC_KEY: 'Ключ, который Вы ввели, является ключом NEM NIS1. Пожалуйста, введите публичный ключ Symbol', + POST_OPTIN_ERROR_INVALID_KEY: 'Неправильный ключ', + POST_OPTIN_CONFIRM_MODAL_TEXT_MULTISIG: "Убедитесь, что в качестве адреса назначения Symbol указан адрес вашего мультисиг аккаунта Symbol. Если он не совпадает, начните процесс снова и предоставьте корректный публичный ключ от мультисиг аккаунта Symbol.", + POST_OPTIN_CONFIRM_MODAL_CHECKBOX_MULTISIG: "Я подтверждаю, что адрес назначения совпадает с адресом мультисиг аккаунта Symbol", }); } diff --git a/src/app/modules/languages/uk.js b/src/app/modules/languages/uk.js index 59809a67..c6bf2e1b 100644 --- a/src/app/modules/languages/uk.js +++ b/src/app/modules/languages/uk.js @@ -979,21 +979,22 @@ function UkrainianProvider($translateProvider) { OPTIN_VRF_KEYS:'Add VRF Keys', OPTIN_VRF_PUBLIC: 'VRF Public Address', OPTIN_VRF_PRIVATE: 'VRF Private Key', - OPTIN_TAC_TITLE:'Terms and Conditions', - OPTIN_TAC_TEXT:'terms and conditions', - OPTIN_TAC_INFO_1:'The Opt-in process is a feature launched by Symbol Chain Limited with the aim of helping NIS1 users migrate their balances to their new Symbol network. It is a process defined under certain parameters that all users who adhere to it have to comply with.', - OPTIN_TAC_INFO_2:'Symbol Chain Limited will not be liable for any incidents outside of the terms and conditions specified below.', - OPTIN_TAC_READ_ACCEPT: 'I have read and accept the ', - OPTIN_CONFIRM_TITLE:'Confirm Symbol Opt-in', - OPTIN_CONFIRM_INFO:'We are almost done! This will be the information that will be migrated to the new Symbol chain. Review it carefully and sign with your NEM key to finish your Opt-in.', - OPTIN_CONFIRM_OPTIN:'Confirm Opt-in', - HERE:'here', - OPTIN_ENTER_PASSWORD: 'Enter your NEM NIS1 password to sign the Opt-in', - OPTIN_LOADING: 'Fetching Opt In data...', - OPTIN_FINISHED: 'Підписку Опт-ін буде відкрито після запуску основної мережі Symbol. Будь ласка, очікуйте на нову версію гаманця.', - CREATE_SYMBOL_ACCOUNT: 'Create your Symbol account', - OPTIN_SYMBOL_READY: 'Your Symbol account is ready', - OPTIN_COPY_SUCCESS: 'Copied!', + OPTIN_TAC_TITLE:'Правила та умови', + OPTIN_TAC_TEXT:'правила та умови', + OPTIN_TAC_INFO_1:'Процес Опт-ін - це функція, яку запускає Symbol Chain Limited з метою допомогти користувачам NIS1 перенести свої баланси на нову мережу Symbol. Це процес, визначений певними параметрами, якого повинні дотримуватися всі користувачі.', + OPTIN_TAC_INFO_2:'Компанія Symbol Chain Limited не несе відповідальності за будь-які інциденти поза межами термінів та умов, зазначених нижче.', + OPTIN_TAC_READ_ACCEPT: 'Я прочитав і приймаю ', + OPTIN_TAC_READ_ACCEPT_POST: ' ', + OPTIN_CONFIRM_TITLE:'Підтвердити Symbol Опт-ін', + OPTIN_CONFIRM_INFO:'Ми майже закінчили! Це буде інформація, яка буде перенесена до нового блокчейну Symbol. Уважно перегляньте її та підпишіть ключем NEM, щоб завершити Опт-ін.', + OPTIN_CONFIRM_OPTIN:'Підтвердити Opt-in', + HERE:'тут', + OPTIN_ENTER_PASSWORD: 'Введіть свій пароль NEM NIS1, щоб підписати Опт-ін.', + OPTIN_LOADING: 'Завантаження...', + OPTIN_FINISHED: 'Програма Опт-ін завершена, будь ласка, оновіть додаток, щоб отримати останні відомості', + CREATE_SYMBOL_ACCOUNT: 'Створіть Ваш акаунт Symbol', + OPTIN_SYMBOL_READY: 'Ваш акаунт Symbol готовий', + OPTIN_COPY_SUCCESS: 'Скопійовано!', OPTIN_TYPE_SELECT: 'Выберите способ, с помощью которого вы произвели опт-ин процесс, в этом кошельке', CATAPULT_OPT_IN_ERROR_TOO_MUCH_COSIGNATORIES: 'У этого аккаунта более 8 подписантов. Протокол Opt In позволяет использовать мультисиг аккаунты не более чем с 9 подписантами. ', @@ -1039,6 +1040,13 @@ function UkrainianProvider($translateProvider) { OPTIN_ERROR_TITLE_1: 'Цей opt-in запит не вдався, оскільки цільовий рахунок для нарахування не був дійсним.', OPTIN_ERROR_TITLE_2: 'Цей opt-in запит не вдався, оскільки один або декілька підписантів не були дійсними.', OPTIN_SIGNED: 'Підписано', + POST_OPTIN_CONFIRM_MODAL_TITLE: 'Увага!', + POST_OPTIN_CONFIRM_MODAL_TEXT: 'Переконайтесь, що адреса призначення Symbol - це адреса вашого акаунту Symbol. Адресу свого акаунту Symbol можна знайти на головному екрані гаманця Symbol. Якщо вони не збігаються, будь ласка, запустіть процес знову та надайте дійсний відкритий ключ акаунту Symbol, яким Ви володієте!', + POST_OPTIN_CONFIRM_MODAL_CHECKBOX: 'Я підтверджую, що адреса призначення співпадає з адресою мого акаунту Symbol', + OPTIN_NIS1_PUBLIC_KEY: 'Ключ, що Ви ввели, є ключем NEM NIS1. Будь ласка, уведіть публічний ключ Symbol', + POST_OPTIN_ERROR_INVALID_KEY: 'Неправильний ключ', + POST_OPTIN_CONFIRM_MODAL_TEXT_MULTISIG: "Переконайтесь, що адреса призначення Symbol - це адреса вашого мультисиг акаунту Symbol. Якщо вони не збігаються, будь ласка, почніть процес знову та надайте дійсний відкритий ключ мультисиг акаунту Symbol.", + POST_OPTIN_CONFIRM_MODAL_CHECKBOX_MULTISIG: "Я підтверджую, що адреса призначення співпадає з адресою мультисиг акаунту Symbol", }); } diff --git a/src/app/services/catapultOptin.service.js b/src/app/services/catapultOptin.service.js index 7d75d49b..d6011e0b 100644 --- a/src/app/services/catapultOptin.service.js +++ b/src/app/services/catapultOptin.service.js @@ -67,6 +67,15 @@ class CatapultOptin { }; } + async checkIfNIS1PublicKeyOrPrivateKey(key) { + const publicKeyAddress = nem.utils.format.pubToAddress(key, this._Wallet.network); + const privateKeyAddress = nem.utils.format.pubToAddress(nem.crypto.keyPair.create(key).publicKey.toString(), this._Wallet.network); + + const publicKeyData = await nem.com.requests.account.data(this._Wallet.node, publicKeyAddress); + const privateKeyData = await nem.com.requests.account.data(this._Wallet.node, privateKeyAddress); + return publicKeyData.account.balance === 0 && publicKeyData.account.publicKey == null && privateKeyData.account.balance === 0 && privateKeyData.account.publicKey == null; + } + getStatus(account) { return new Promise( (resolve) => { const config = this.getOptinConfig(); diff --git a/src/images/address-verify-2.png b/src/images/address-verify-2.png new file mode 100644 index 00000000..42f21dea Binary files /dev/null and b/src/images/address-verify-2.png differ diff --git a/src/images/address-verify.png b/src/images/address-verify.png new file mode 100644 index 00000000..ed7046f0 Binary files /dev/null and b/src/images/address-verify.png differ diff --git a/src/sass/_new.scss b/src/sass/_new.scss index ce5e5bff..ff282451 100644 --- a/src/sass/_new.scss +++ b/src/sass/_new.scss @@ -1822,6 +1822,42 @@ textarea { margin-top: 2rem; +} + +.mt-1 { + + margin-top: 1rem; + +} + +.mb-4 { + + margin-bottom: 2rem; + +} + +.mb-2 { + + margin-bottom: 4rem; + +} + +.pt-2 { + + padding-top: 2rem; + +} + +.pt-1 { + + padding-top: 1rem; + +} + +.pb-2 { + + padding-bottom: 2rem; + } .optin-Selector{ span{ @@ -1840,9 +1876,45 @@ textarea { } } +.optin-confirm-bg { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background-color: #0005; + display: flex; + justify-content: center; + align-items: center; +} + +.optin-confirm-modal { + height: 70%; + margin-top: 4rem; + background-color: #f3f4f8; + border-radius: 6px; + box-shadow: 0 3px 200px #0005; +} + +.optin-confirm-modal-inner { + height: 100%; +} +.optin-confirm-modal-body { + padding-right: 4rem; + height: 100%; + overflow-y: auto; +} +.optin-confirm-modal-image-container { + height: 100%; + overflow: hidden; +} +.optin-confirm-modal-image { + width: 100%; + margin-top: 1.5rem; +}