diff --git a/README.md b/README.md index f68b6843..077782ba 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ Click on the bottom link "fix this" to create an admin user, say: ### Profit - DB_HOST=127.0.0.1 DB_PORT=5984 DB_USER=admin DB_PASSWORD=password COOKIE_SALT=secret PROXY_URL=https://hive-proxy.herokuapp.com npm run dev + DB_HOST=127.0.0.1 DB_PORT=5984 DB_USER=admin DB_PASSWORD=password COOKIE_SALT=secret PROXY_URL=https://hive-proxy.herokuapp.com?url= npm run dev open http://localhost:8080 Optional environment variables: @@ -64,6 +64,19 @@ This project has js & css live reload setup. If you wish to use it to boost your 2. symlink the playbook file into place: `ln -s path/to/ansible/repo provisioners` (Windows users can add directory to %PATH%) 3. `vagrant up` or `vagrant reload --provision` +### Deploy to Heroku + +After all the regular heroku setup and hive-js setup as layed out above, install the heroku-hive-deploy plugin: + + # one-time install + plugins:install https://github.com/hone/heroku-hive-deploy.git + + # deploy from your local hive-js dir: + heroku deploy:hive `pwd` + + # alternatively, you can also deploy from a git uri: + heroku deploy:hive + ## Contributing ### Instructions diff --git a/app/application.js b/app/application.js index d9a12591..6564e153 100644 --- a/app/application.js +++ b/app/application.js @@ -38,7 +38,7 @@ window.initHiveApp = function() { _html.removeClass('prevent_scroll') }) - emitter.on('wallet-ready', function(){ + emitter.on('balance-ready', function(){ auth.hide() frame.show() }) diff --git a/app/index.html b/app/index.html index c0e6e850..d3af596d 100644 --- a/app/index.html +++ b/app/index.html @@ -4,8 +4,9 @@ Hive Web - + + diff --git a/app/lib/geo/index.js b/app/lib/geo/index.js index 4eb56783..02635d73 100644 --- a/app/lib/geo/index.js +++ b/app/lib/geo/index.js @@ -15,7 +15,7 @@ function fetchUserInfo(callback){ userInfo.name = doc.userInfo.firstName userInfo.email = doc.userInfo.email userInfo.avatarIndex = doc.userInfo.avatarIndex - userInfo.address = getWallet().currentAddress + userInfo.address = getWallet().getNextAddress() userInfo.network = getNetwork() callback() diff --git a/app/lib/i18n/package.json b/app/lib/i18n/package.json index 3dc8893d..dd41fac0 100644 --- a/app/lib/i18n/package.json +++ b/app/lib/i18n/package.json @@ -6,7 +6,7 @@ "author": "Wei Lu", "license": "GPL-2.0+", "dependencies": { - "brfs": "^1.2.0", + "brfs": "1.2.0", "counterpart": "^0.16.0" }, "browserify": { diff --git a/app/lib/i18n/translations/cs-cz.json b/app/lib/i18n/translations/cs-cz.json new file mode 100644 index 00000000..1189f6c1 --- /dev/null +++ b/app/lib/i18n/translations/cs-cz.json @@ -0,0 +1,108 @@ +{ + "Back to hivewallet.com": "Zpět na hivewallet.com", + "Create new wallet": "Založit novou peněženku", + "Open existing wallet": "Otevřít existující peněženku", + "We are about to generate your very own passphrase": "Nyní vygenerujeme Vaše vlastní heslo", + "This keeps your account secure, and lets you open your wallet on multiple devices.": "Toto umožňuje Vašemu účtu být vždy zabezpečený i při přístupu z různých zařízení.", + "It is very important you write this down.": "Je velmi důležité si tohle zaznamenat.", + "Generate passphrase": "Vygenerovat heslo", + "Go back": "Vrátit se zpět", + "Generating": "Generuji", + "Decoding passphrase": "Dekóduji heslo", + "Synchronizing Wallet": "Synchronizuji peněženku", + "Set your PIN": "Nastavte svůj PIN", + "Your passphrase": "Vaše heslo", + "Your passphrase will not be shown again.": "Vaše heslo nebude znovu zobrazeno.", + "Without it you will lose access to your wallet.": "Bez něj ztratíte přístup ke své peněžence.", + "I have written down or otherwise securely stored my passphrase": "Zapsal jsem si nebo jinak bezpečně uchoval mé heslo", + "Open wallet": "Otevřít peněženku", + "Checking passphrase": "Kontroluji heslo", + "Enter Passphrase": "Vložte heslo", + "Invalid passphrase": "Neplatné heslo", + "Enter your PIN": "Zadejte Váš PIN", + "Set a PIN for quick access": "Zadejte PIN pro rychlý přístup", + "Review passphrase again": "Znovu zkontrolovat heslo", + "Open a different wallet": "Otevřít jinou peněženku", + "Forgot PIN": "Forgot PIN", + "PIN must be a 4-digit number": "PIN musí být 4-místné číslo", + "Verifying PIN": "Ověřuji pin", + "Setting PIN": "Nastavuji PIN", + "This might take some time,": "Tohle může zabrat nějaký čas.", + "please be patient.": "prosím o strpení", + "Your PIN is incorrect": "Zadaný PIN není správný", + "Request timeout. Please check your internet connection.": "Vypršel čas na odpověď. Prosím zkontrolujte své internetové připojení.", + "Could not save your details": "Vaše informace nebyli uloženy", + "We could not connect you to Waggle, please check your internet connection.": "Nemohli jsme Vás připojit k Vašemu Waggle, prosím zkontrolujte své internetové připojení.", + "Please enter a valid address to send to": "Prosím zadejte platnou adresu k zaslání", + "Please enter an amount above": "Prosím výše zadejte množství %(dust)s", + "Some funds are temporarily unavailable. To send this transaction, you will need to wait for your pending transactions to be confirmed first (this should not take more than a few minutes).": "Některé prostředky jsou dočasně nedostupné. K odeslání této transakce musíte nejprve počkat na potvrzení příchozích transakcí (toto by nemělo trvat více než několik minut).", + "What does this mean?": "Co to znamená?", + "It seems like you are trying to empty your wallet. Taking transaction fee into account, we estimated that the max amount you can send is. We have amended the value in the amount field for you": "Vypadá to, že se snažíte použít vyprázdnit svou peněženku. Po započtení transakcí, odhadujeme maximální možné množství k odeslání %(sendableBalance)s. Nastavili jsme pro Vás toto množství ve formuláři.", + "You do not have enough funds in your wallet": "Nemáte dostatek prostředků ve Vaší peněžence.", + "A name is required to set your profile on Hive": "Jméno je vyžadováno k založení profilu na Hive", + "Uh Oh...": "Jejda...", + "Whoops!": "Hups...", + "Just saying...": "Jen říkám...", + "Your browser does not support geolocation": "Váš prohlížeč nepodporuje geolokaci", + "Unable to retrieve your location": "Vaše lokace nebyla zjištěna", + "Without a name, the payer would not be able to identify you on Waggle.": "Bez jména by Vás plátce nebyl schopný na Waggle najít.", + "cannot be blank": "%(blankField)s nemůže/nemohou být prázdné.", + "name": "jméno", + "email": "e-mail", + "description": "popis", + "Change your details": "Změnit svůj profil", + "Your name": "Vaše jméno", + "Gravatar email": "Gravatar e-mail", + "Submit": "Odeslat", + "Gravatar (globally recognised avatar) is a service that lets you re-use the same avatar across websites and apps by specifying an email address.": "Gravatar (globálně používaný avatar) je služba, která Vám umožňuje zadáním e-mailové adresy znovu použít stejného avatara napříč různými webovými stránkami a aplikacemi.", + "Create a gravatar": "Vytvořit gravatar", + "Logout": "Odhlásit se", + "Support": "Podpora", + "Send": "Odeslat", + "Receive": "Přijmout", + "History": "Historie", + "Tokens": "Tokeny", + "Waggle lets you broadcast your wallet address to other nearby Hive users by comparing GPS data. This data is deleted once you turn Waggle off.": "Waggle vám umožňujě šířit adresu Vaší peněženky uživatelům nacházejícím se blízko Vás pomocí porovnávání GPS dat. Tyto data jsou smazána poté co vypnete Waggle.", + "Having problems?": "Máte problémy?", + "Description": "Popis", + "Your email address": "Vaše e-mailová schránka", + "Nevermind": "Zapomeň na to", + "Before you start using Waggle, you need to enter a name that will help others identify you.": "Předtím než začnete používat Waggle, musíte nejprve zadat jméno, které pomůže ostatním Vás najít.", + "Save": "Uložit", + "Loading transactions...": "Loading transactions...", + "Your transaction history": "Historie Vašich transakcí", + "pending confirmation": "probíhá potvrzení", + "Received": "Přijato", + "You do not have any transactions yet": "Zatím nebyli uskutečněny žádné transakce.", + "Transaction Id:": "Id transakce:", + "Transaction Fee:": "Transaction Fee:", + "Inputs:": "Inputs:", + "Outputs:": "Outputs:", + "Sent to:": "Odesláno na:", + "Your wallet address": "Adresa Vaší peněženky", + "Waggle": "Waggle", + "Turn Waggle on": "Zapnout Waggle", + "Turn Waggle off": "Vypnout Waggle", + "Checking your location": "Zjišťuji vaši polohu", + "Broadcasting your location...": "Publikovat Vaši polohu", + "Wallet address": "Adresa peněženky", + "Amount": "Množství", + "Exchange rate unavailable for the selected currency": "Směnný kurz pro zvolenou měnu je nedostupný ", + "Confirm": "Potvrdit", + "No Hive users found nearby": "Žádní uživatelé Hive nejsou poblíž", + "Search Again": "Hledat znovu", + "Searching...": "Hledám...", + "Searching your area for other Hive Web users": "Hledám uživatele Hive Web ve Vaší blízkosti", + "Confirm transaction": "Potvrdit transakci", + "transaction fee": "poplatek transakce", + "Cancel": "Zrušit", + "Transaction Successful": "Transakce byla úspěšná", + "Your transaction will appear in your history tab shortly.": "Vaše transakce se během chvíle objeví v záložce historie.", + "Close": "Zavřít", + "Report": "Nahlásit", + "Transaction Failed": "Transakce selhala", + "Please make sure you are connected to the internet.": "Prosím zkontrolujte své připojení k internetu.", + "Please describe what happened above. Below are network error logs that could help us identify your issue.": "Prosím výše uveďte co se přesně stalo. Níže jsou uvedeny záznamy, které nám pomohou identifikovat problém.", + "Sorry, Hive Wallet did not load.": "Omlouváme se, Hive peněžěnka se nenačetla.", + "Try updating your browser, or switching out of private browsing mode. If all else fails, download Chrome for your device.": "Zkuste instalovat nejnovější verzi prohlížeče nebo vypněte prohlížení v anonymním módu. Pokud vše selže, stáhněte prohlížeč Chrome pro své zařízení." +} \ No newline at end of file diff --git a/app/lib/i18n/translations/de.json b/app/lib/i18n/translations/de.json index 55f28100..ae864942 100644 --- a/app/lib/i18n/translations/de.json +++ b/app/lib/i18n/translations/de.json @@ -23,6 +23,7 @@ "Set a PIN for quick access": "Lege einen PIN für schnellen Zugang fest", "Review passphrase again": "Prüfe die Passphrase noch einmal", "Open a different wallet": "Eine andere Brieftasche öffnen", + "Forgot PIN": "Forgot PIN", "PIN must be a 4-digit number": "PIN muss eine 4-stellige Nummer sein", "Verifying PIN": "Prüfe PIN", "Setting PIN": "Setze PIN", @@ -68,11 +69,15 @@ "Nevermind": "Mach Dir nichts daraus!", "Before you start using Waggle, you need to enter a name that will help others identify you.": "Um Waggle zu benutzen, musst Du einen Benutzernamen auswählen. So können Dich andere Benutzer finden.", "Save": "Speichern", + "Loading transactions...": "Loading transactions...", "Your transaction history": "Chronik Deiner Transaktionen", "pending confirmation": "Warte auf Bestätigungen", "Received": "Erhalten", "You do not have any transactions yet": "Du hast noch keine Transaktionen getätigt", "Transaction Id:": "Transaktions-ID:", + "Transaction Fee:": "Transaction Fee:", + "Inputs:": "Inputs:", + "Outputs:": "Outputs:", "Sent to:": "Überwiesen an:", "Your wallet address": "Die Adresse Deiner Brieftasche", "Waggle": "Waggle", diff --git a/app/lib/i18n/translations/en.json b/app/lib/i18n/translations/en.json index 64535899..1df844f4 100644 --- a/app/lib/i18n/translations/en.json +++ b/app/lib/i18n/translations/en.json @@ -23,6 +23,7 @@ "Set a PIN for quick access": "Set a PIN for quick access", "Review passphrase again": "Review passphrase again", "Open a different wallet": "Open a different wallet", + "Forgot PIN": "Forgot PIN", "PIN must be a 4-digit number": "PIN must be a 4-digit number", "Verifying PIN": "Verifying PIN", "Setting PIN": "Setting PIN", @@ -68,11 +69,15 @@ "Nevermind": "Nevermind", "Before you start using Waggle, you need to enter a name that will help others identify you.": "Before you start using Waggle, you need to enter a name that will help others identify you.", "Save": "Save", + "Loading transactions...": "Loading transactions...", "Your transaction history": "Your transaction history", "pending confirmation": "pending confirmation", "Received": "Received", "You do not have any transactions yet": "You don't have any transactions yet", "Transaction Id:": "Transaction Id:", + "Transaction Fee:": "Transaction Fee:", + "Inputs:": "Inputs:", + "Outputs:": "Outputs:", "Sent to:": "Sent to:", "Your wallet address": "Your wallet address", "Waggle": "Waggle", diff --git a/app/lib/i18n/translations/es.json b/app/lib/i18n/translations/es.json index 5064db9c..a52c5034 100644 --- a/app/lib/i18n/translations/es.json +++ b/app/lib/i18n/translations/es.json @@ -23,6 +23,7 @@ "Set a PIN for quick access": "Elige un PIN para acceso rápido", "Review passphrase again": "Revisa tu passphrase de nuevo", "Open a different wallet": "Abrir un monedero diferente", + "Forgot PIN": "Forgot PIN", "PIN must be a 4-digit number": "El pin debe ser un número de 4 digitos", "Verifying PIN": "Verificando PIN", "Setting PIN": "Ajustando PIN", @@ -68,11 +69,15 @@ "Nevermind": "No importa", "Before you start using Waggle, you need to enter a name that will help others identify you.": "Antes de empezar a usar Waggle, necesitas un nombre para ayudar a los demás a identificarte.", "Save": "Guardar", + "Loading transactions...": "Loading transactions...", "Your transaction history": "Tu historial de transacciones", "pending confirmation": "confirmación pendiente", "Received": "Recibido", "You do not have any transactions yet": "No tienes ninguna transacción aún", "Transaction Id:": "Id de la transacción:", + "Transaction Fee:": "Transaction Fee:", + "Inputs:": "Inputs:", + "Outputs:": "Outputs:", "Sent to:": "Enviado a:", "Your wallet address": "Tu dirección del monedero", "Waggle": "Waggle", diff --git a/app/lib/i18n/translations/fil.json b/app/lib/i18n/translations/fil.json index a419cb8c..dbe4dbdf 100644 --- a/app/lib/i18n/translations/fil.json +++ b/app/lib/i18n/translations/fil.json @@ -8,7 +8,7 @@ "Generate passphrase": "Bumuo ng passphrase", "Go back": "Bumalik", "Generating": "Bumubuo", - "Decoding passphrase": "Decoding passphrase", + "Decoding passphrase": "Dine-decode ang passphrase", "Synchronizing Wallet": "Sini-synchronize ang Wallet", "Set your PIN": "I-set ang iyong PIN", "Your passphrase": "Ang iyong passphrase", @@ -23,6 +23,7 @@ "Set a PIN for quick access": "Mag-set ng PIN para sa mabilis na access", "Review passphrase again": "I-review ang passphrase uli", "Open a different wallet": "Magbukas ng ibang wallet", + "Forgot PIN": "Forgot PIN", "PIN must be a 4-digit number": "Ang PIN ay kinakailangang maging 4- digit na numero", "Verifying PIN": "Vine-verify ang PIN", "Setting PIN": "Nagse-set ng PIN", @@ -68,11 +69,15 @@ "Nevermind": "Hindi bale", "Before you start using Waggle, you need to enter a name that will help others identify you.": "Bago mo simulan ang paggamit ng Waggle, kinakailangan mong mag-enter ng pangalan na tutulong sa iba sa pagkakilala sa iyo.", "Save": "I-save", + "Loading transactions...": "Loading transactions...", "Your transaction history": "Ang iyong kasaysayan ng transaksyon", "pending confirmation": "pending na kumpirmasyon", "Received": "natanggap ", "You do not have any transactions yet": "Wala ka pang mga transaksyon pa", "Transaction Id:": "Transaction Id:", + "Transaction Fee:": "Transaction Fee:", + "Inputs:": "Inputs:", + "Outputs:": "Outputs:", "Sent to:": "Naipadala kay:", "Your wallet address": "Ang iyong wallet address", "Waggle": "Waggle", @@ -86,7 +91,7 @@ "Confirm": "Ikumpirma", "No Hive users found nearby": "Walang mga Hive user na mahanap na malapit", "Search Again": "Maghanap Uli", - "Searching...": "Searching...", + "Searching...": "Naghahanap...", "Searching your area for other Hive Web users": "Maghanap sa iyong lugar para sa ibang Hive Web user", "Confirm transaction": "Kumpirmahin ang transaksyon", "transaction fee": "transaction fee", @@ -94,10 +99,10 @@ "Transaction Successful": "Matagumpay ang Transaksyon", "Your transaction will appear in your history tab shortly.": "Ang iyong transaksyon ay makikita sa iyong tab ng kasaysayan nang ilang sandali.", "Close": "Isara", - "Report": "Report", + "Report": "I-report", "Transaction Failed": "Ang Transaksyon ay Nabigo", "Please make sure you are connected to the internet.": "Maari lamang na siguraduhin na ikaw ay nakakunekta sa internet.", - "Please describe what happened above. Below are network error logs that could help us identify your issue.": "Please describe what happened above. Below are network error logs that could help us identify your issue.", + "Please describe what happened above. Below are network error logs that could help us identify your issue.": "Maari lamang na ilarawan ang pangyayari sa itaas. Sa ilalim naman ay mga network log na maaring makatulong sa amin upang malaman ang iyong isyu.", "Sorry, Hive Wallet did not load.": "Patawad, ang Hive Wallet ay hindi na-load.", "Try updating your browser, or switching out of private browsing mode. If all else fails, download Chrome for your device.": "Subukang i-update ang iyong browser, o lumabas sa private browsing mode. Kung lahat ay bigo, i-download ang Chrome sa iyong aparato." } \ No newline at end of file diff --git a/app/lib/i18n/translations/fr.json b/app/lib/i18n/translations/fr.json index 6fa776c6..c91b2c0f 100644 --- a/app/lib/i18n/translations/fr.json +++ b/app/lib/i18n/translations/fr.json @@ -1,5 +1,5 @@ { - "Back to hivewallet.com": "Retour a hivewallet.com", + "Back to hivewallet.com": "Retour vers hivewallet.com", "Create new wallet": "Créer un nouveau portefeuille", "Open existing wallet": "Ouvrir un portefeuille existant", "We are about to generate your very own passphrase": "Nous générons votre propre mot de passe maintenant", @@ -23,6 +23,7 @@ "Set a PIN for quick access": "Définir un code PIN pour un accès rapide", "Review passphrase again": "Revue mot de passe à nouveau", "Open a different wallet": "Ouvrez un portefeuille différent", + "Forgot PIN": "Forgot PIN", "PIN must be a 4-digit number": "PIN doit être un nombre à 4 chiffres", "Verifying PIN": "Vérification code PIN", "Setting PIN": "PIN de réglage", @@ -68,11 +69,15 @@ "Nevermind": "Tant pis", "Before you start using Waggle, you need to enter a name that will help others identify you.": "Avant de commencer à utiliser Waggle, vous devez entrer un nom qui aidera les autres à vous identifier.", "Save": "Sauvegarder", + "Loading transactions...": "Loading transactions...", "Your transaction history": "Votre historique des transactions", "pending confirmation": "en attente de confirmation", "Received": "Reçu", "You do not have any transactions yet": "Vous n'avez pas encore de transactions", "Transaction Id:": "Identité de transaction", + "Transaction Fee:": "Frais de transaction : ", + "Inputs:": "Entrées : ", + "Outputs:": "Sorties : ", "Sent to:": "envoyé à:", "Your wallet address": "Votre adresse de portefeuille", "Waggle": "Waggle", diff --git a/app/lib/i18n/translations/hu.json b/app/lib/i18n/translations/hu.json index 6b874e4f..408b0dc4 100644 --- a/app/lib/i18n/translations/hu.json +++ b/app/lib/i18n/translations/hu.json @@ -1,8 +1,8 @@ { - "Back to hivewallet.com": "Menj vissza hivewallet.com", + "Back to hivewallet.com": "Menj vissza a hivewallet.com-ra", "Create new wallet": "Új tárca", "Open existing wallet": "Meglévő tárca megnyitása", - "We are about to generate your very own passphrase": "Rajta vagyunk a saját jelszavad generálásán", + "We are about to generate your very own passphrase": "Hamarosan legeneráljuk a saját jelszavad.", "This keeps your account secure, and lets you open your wallet on multiple devices.": "Ez segít biztonságossá tenni a fiókodat és így meg tudod nyitni a tárcád más eszközökön is.", "It is very important you write this down.": "Nagyon fontos, hogy ezt leírd.", "Generate passphrase": "Jelszó generálása", @@ -22,13 +22,14 @@ "Enter your PIN": "Add meg a PIN kódod", "Set a PIN for quick access": "állíts be PIN-t a gyorsabb hozzáféréshez", "Review passphrase again": "Nézd meg újra a jelszavad", - "Open a different wallet": "Nyiss meg egy létező tárcát", + "Open a different wallet": "Nyiss meg egy másik tárcát", + "Forgot PIN": "Forgot PIN", "PIN must be a 4-digit number": "A PIN csak 4 szám lehet", "Verifying PIN": "PIN ellenőrzése", "Setting PIN": "PIN beállítása", "This might take some time,": "Ez a folyamat egy kis időt igényel,", "please be patient.": "Kérlek legyél türelmes.", - "Your PIN is incorrect": "A PIN kódod helyes", + "Your PIN is incorrect": "A PIN kódod helytelen", "Request timeout. Please check your internet connection.": "Időtullépés. Kérlek ellenőrizd az internet kapcsolatot.", "Could not save your details": "Nem lehet elmenteni az adataid", "We could not connect you to Waggle, please check your internet connection.": "Nem tudunk csatlakozni a Waggle-hez, kérlek ellenőrizd az internet kapcsolatot.", @@ -56,7 +57,7 @@ "Gravatar (globally recognised avatar) is a service that lets you re-use the same avatar across websites and apps by specifying an email address.": "Gravatar (globally recognised avatar) egy szolgáltatás ahol ugyanazt az avatart használhatod weboldalakon és alkalmazásokban.", "Create a gravatar": "Gravatar készítése", "Logout": "Kijelentkezés", - "Support": "Támogatás", + "Support": "Segítség", "Send": "Küldés", "Receive": "Fogadás", "History": "Előzmények", @@ -65,14 +66,18 @@ "Having problems?": "Problémád van?", "Description": "Leírás", "Your email address": "A te email címed", - "Nevermind": "Sebaj", + "Nevermind": "Mégse", "Before you start using Waggle, you need to enter a name that will help others identify you.": "Mielőtt még használod a Waggle-t, meg kell adnod egy nevet, ami segít másoknak azonosítani téged.", "Save": "Mentés", + "Loading transactions...": "Loading transactions...", "Your transaction history": "A tranzakcióid előzményei", "pending confirmation": "Megerősítés folyamatban ", "Received": "Fogadva", "You do not have any transactions yet": "Még nincsenek tranzakcióid", "Transaction Id:": "Tranzakció Id:", + "Transaction Fee:": "Transaction Fee:", + "Inputs:": "Inputs:", + "Outputs:": "Outputs:", "Sent to:": "Küldés neki:", "Your wallet address": "A te címed", "Waggle": "Waggle", @@ -80,7 +85,7 @@ "Turn Waggle off": "Waggle kikapcsolása", "Checking your location": "A helyzeted ellenőrzése", "Broadcasting your location...": "A helyzeted közvetítése...", - "Wallet address": "Tárca címed", + "Wallet address": "Bitcoin cím", "Amount": "Összeg", "Exchange rate unavailable for the selected currency": "Nem érhető el árfolyam a kiválasztott valutához", "Confirm": "Megerősítés", diff --git a/app/lib/i18n/translations/id.json b/app/lib/i18n/translations/id.json index 6ac29172..d5fed2c3 100644 --- a/app/lib/i18n/translations/id.json +++ b/app/lib/i18n/translations/id.json @@ -23,6 +23,7 @@ "Set a PIN for quick access": "Atur sebuah PIN untuk akses cepat", "Review passphrase again": "Lihat ulang kata sandi anda", "Open a different wallet": "Buka dompet lain", + "Forgot PIN": "Forgot PIN", "PIN must be a 4-digit number": "PIN harus terdiri dari 4-digit angka", "Verifying PIN": "Verifikasi PIN", "Setting PIN": "Atur PIN", @@ -68,11 +69,15 @@ "Nevermind": "Abaikan", "Before you start using Waggle, you need to enter a name that will help others identify you.": "Sebelum anda menggunakan Waggle, anda harus memasukkan sebuah nama yang dapat membantu orang lain mengidentifikasi anda", "Save": "Simpan", + "Loading transactions...": "Loading transactions...", "Your transaction history": "Riwayat transaksi anda", "pending confirmation": "konfirmasi tertunda", "Received": "Diterima", "You do not have any transactions yet": "Anda belum melakukan transaksi apapun", "Transaction Id:": "Id Transaksi:", + "Transaction Fee:": "Transaction Fee:", + "Inputs:": "Inputs:", + "Outputs:": "Outputs:", "Sent to:": "Dikirim ke:", "Your wallet address": "Alamat dompet anda", "Waggle": "Waggle", diff --git a/app/lib/i18n/translations/it.json b/app/lib/i18n/translations/it.json new file mode 100644 index 00000000..a8b58f22 --- /dev/null +++ b/app/lib/i18n/translations/it.json @@ -0,0 +1,108 @@ +{ + "Back to hivewallet.com": "Torna su hivewallet.com", + "Create new wallet": "Crea nuovo portafoglio", + "Open existing wallet": "Apri portafoglio esistente", + "We are about to generate your very own passphrase": "Stiamo per generare la tua passphrase privata", + "This keeps your account secure, and lets you open your wallet on multiple devices.": "Questo mantiene il tuo account sicuro, e ti permette di aprire il tuo portafoglio su diversi dispositivi.", + "It is very important you write this down.": "E' davvero importante salvare questa frase.", + "Generate passphrase": "Genera passphrase", + "Go back": "Torna indietro", + "Generating": "Creazione in corso", + "Decoding passphrase": "Decodifica passphrase", + "Synchronizing Wallet": "Sincronizzazione Portafoglio", + "Set your PIN": "Imposta il tuo PIN", + "Your passphrase": "La tua passphrase", + "Your passphrase will not be shown again.": "La tua passphrase non verrà mostrata di nuovo.", + "Without it you will lose access to your wallet.": "Senza di essa perderai l'accesso al tuo portafoglio.", + "I have written down or otherwise securely stored my passphrase": "Ho trascritto o salvato in qualche modo la mia passphrase", + "Open wallet": "Apri portafoglio", + "Checking passphrase": "Verifica passhprase", + "Enter Passphrase": "Inserisci Passphrase", + "Invalid passphrase": "Passphrase invalida", + "Enter your PIN": "Inserisci il tuo PIN", + "Set a PIN for quick access": "Imposta un PIN per l'accesso rapido", + "Review passphrase again": "Verifica di nuovo la passphrase", + "Open a different wallet": "Apri un altro portafoglio", + "Forgot PIN": "Forgot PIN", + "PIN must be a 4-digit number": "Il PIN dev'essere composto da 4 numeri", + "Verifying PIN": "Verifica PIN", + "Setting PIN": "Impostazione PIN", + "This might take some time,": "Può essere necessario del tempo,", + "please be patient.": "sii paziente.", + "Your PIN is incorrect": "Il tuo PIN non è corretto", + "Request timeout. Please check your internet connection.": "Timeout connessione. Verifica la tua connessione internet.", + "Could not save your details": "Non è possibile salvare i tuoi dettagli", + "We could not connect you to Waggle, please check your internet connection.": "Non è stato possibile collegarti a Waggle, verifica la tua connessione internet.", + "Please enter a valid address to send to": "Inserisci un indirizzo valido per l'invio", + "Please enter an amount above": "Inserisci un importo superiore a %(dust)s", + "Some funds are temporarily unavailable. To send this transaction, you will need to wait for your pending transactions to be confirmed first (this should not take more than a few minutes).": "Parte dei tuoi fondi non sono disponibili. Per inviare questa transazione, devi aspettare che le tue transazioni pendenti siano confermate (ci vorrà qualche minuto).", + "What does this mean?": "Che significa?", + "It seems like you are trying to empty your wallet. Taking transaction fee into account, we estimated that the max amount you can send is. We have amended the value in the amount field for you": "Sembra che tu voglia svuotare il tuo portafoglio. Considerando la commissioni per la transazione, abbiamo calcolato che l'importo massimo che puoi inviare è %(sendableBalance)s. Abbiamo corretto l'importo per te.", + "You do not have enough funds in your wallet": "Non hai fondi sufficienti nel tuo portafoglio.", + "A name is required to set your profile on Hive": "Per impostare il tuo profilo Hive è richiesto un nome", + "Uh Oh...": "Uh Oh...", + "Whoops!": "Whoops!", + "Just saying...": "Tanto per dire...", + "Your browser does not support geolocation": "Il tuo browser non supporta la geolocalizzazione", + "Unable to retrieve your location": "Non è stato possibile individuare la tua posizione", + "Without a name, the payer would not be able to identify you on Waggle.": "Senza un nome, nessuno può identificarti su Waggle.", + "cannot be blank": "%(blankField)s non può essere vuoto", + "name": "nome", + "email": "email", + "description": "descrizione", + "Change your details": "Cambia i tuoi dettagli", + "Your name": "Il tuo nome", + "Gravatar email": "Email Gravatar", + "Submit": "Conferma", + "Gravatar (globally recognised avatar) is a service that lets you re-use the same avatar across websites and apps by specifying an email address.": "Gravatar (globally recognised avatar) è un servizio che ti permette di utilizzare lo stesso avatar in più siti internet, specificando un particolare indirizzo email.", + "Create a gravatar": "Crea un gravatar", + "Logout": "Esci", + "Support": "Supporto", + "Send": "Invia", + "Receive": "Ricevi", + "History": "History", + "Tokens": "Tokens", + "Waggle lets you broadcast your wallet address to other nearby Hive users by comparing GPS data. This data is deleted once you turn Waggle off.": "Waggle ti permette di mostrare l'indirizzo pubblico del tuo portafoglio a tutti gli utenti Hive vicino a te, utilizzando i dati GPS. Questi dati sono cancellati quando disattivi Waggle.", + "Having problems?": "Problemi?", + "Description": "Descrizione", + "Your email address": "Il tuo indirizzo email", + "Nevermind": "Non importa", + "Before you start using Waggle, you need to enter a name that will help others identify you.": "Prima di utilizzare Waggle devi impostare un nome, così gli altri utenti ti potranno identificare.", + "Save": "Salva", + "Loading transactions...": "Loading transactions...", + "Your transaction history": "La cronologia delle tue transazioni", + "pending confirmation": "conferma in corso", + "Received": "Ricevuti", + "You do not have any transactions yet": "Non hai ancora nessuna transazione", + "Transaction Id:": "Id transazione:", + "Transaction Fee:": "Commissione transazione:", + "Inputs:": "Entrate:", + "Outputs:": "Uscite:", + "Sent to:": "Inviato a:", + "Your wallet address": "L'indirizzo del tuo portafoglio", + "Waggle": "Waggle", + "Turn Waggle on": "Attiva Waggle", + "Turn Waggle off": "Disattiva Waggle", + "Checking your location": "Verifica posizione", + "Broadcasting your location...": "Trasmissione posizione...", + "Wallet address": "Indirizzo portafoglio", + "Amount": "Importo", + "Exchange rate unavailable for the selected currency": "Prezzo non disponibile per la valuta selezionata", + "Confirm": "Conferma", + "No Hive users found nearby": "Nessun utente Hive nelle vicinance", + "Search Again": "Cerca di nuovo", + "Searching...": "Ricerca...", + "Searching your area for other Hive Web users": "Ricerca utenti Hive Web in corso", + "Confirm transaction": "Conferma transazione", + "transaction fee": "commissione transazione", + "Cancel": "Cancella", + "Transaction Successful": "Transazione Confermata", + "Your transaction will appear in your history tab shortly.": "La tua transazione comparirà presto nel tab cronologia.", + "Close": "Chiudi", + "Report": "Report", + "Transaction Failed": "Transazione Fallita", + "Please make sure you are connected to the internet.": "Verifica la tua connessione internet.", + "Please describe what happened above. Below are network error logs that could help us identify your issue.": "Descrivi cosa è accaduto. Sotto ci sono i logs degli errori, ci potrebbero aiutare ad identificare il tuo problema.", + "Sorry, Hive Wallet did not load.": "Spiacente, Hive Wallet non si è caricato.", + "Try updating your browser, or switching out of private browsing mode. If all else fails, download Chrome for your device.": "Prova ad aggiornare il tuo browser, o a disattivare la navigazione in incognito. Se ogni tentativo fallisce, scarica Chrome per il tuo dispositivo." +} \ No newline at end of file diff --git a/app/lib/i18n/translations/ja.json b/app/lib/i18n/translations/ja.json index 9ae78bb3..6f505c1c 100644 --- a/app/lib/i18n/translations/ja.json +++ b/app/lib/i18n/translations/ja.json @@ -23,6 +23,7 @@ "Set a PIN for quick access": "暗証番号を設定", "Review passphrase again": "パスフレーズを再度確認してください", "Open a different wallet": "他のウォレットを開く", + "Forgot PIN": "Forgot PIN", "PIN must be a 4-digit number": "暗証番号は4桁の数字でご入力下さい", "Verifying PIN": "暗証番号を確認中", "Setting PIN": "暗証番号を設定中", @@ -68,11 +69,15 @@ "Nevermind": "キャンセル", "Before you start using Waggle, you need to enter a name that will help others identify you.": "フリフリをご利用になる前に、他のユーザーと交流できるよう、ハンドルネームを設定する必要があります。", "Save": "保存", + "Loading transactions...": "Loading transactions...", "Your transaction history": "取引履歴", "pending confirmation": "未確認", "Received": "受取り済み", "You do not have any transactions yet": "まだ取引がありません", "Transaction Id:": "取引 ID", + "Transaction Fee:": "取引手数料:", + "Inputs:": "入力:", + "Outputs:": "出力:", "Sent to:": "送り先", "Your wallet address": "ウォレットのアドレス", "Waggle": "フリフリ", diff --git a/app/lib/i18n/translations/nb.json b/app/lib/i18n/translations/nb.json new file mode 100644 index 00000000..4aa3b817 --- /dev/null +++ b/app/lib/i18n/translations/nb.json @@ -0,0 +1,108 @@ +{ + "Back to hivewallet.com": "Tilbake til hivewallet.com", + "Create new wallet": "Lag ny lommebok", + "Open existing wallet": "Åpne eksiterende lommebok", + "We are about to generate your very own passphrase": "Vi generer straks din passordfrase", + "This keeps your account secure, and lets you open your wallet on multiple devices.": "Den hjelper å holde kontoen din sikker og lar deg åpne lommeboken på flere enheter.", + "It is very important you write this down.": "Det er veldig viktig at du skriver dette ned.", + "Generate passphrase": "Generer passordfrase", + "Go back": "Gå tilbake", + "Generating": "Genererer", + "Decoding passphrase": "Dekoder passordfrasen", + "Synchronizing Wallet": "Synkroniserer Lommebok", + "Set your PIN": "Sett din PIN", + "Your passphrase": "Din passordfrase", + "Your passphrase will not be shown again.": "Din passordfrase vil ikke bli vist igjen.", + "Without it you will lose access to your wallet.": "Uten den vil du miste tilgang til din lommebok.", + "I have written down or otherwise securely stored my passphrase": "Jeg har skrevet ned eller på annen måte lagret min passordfrase sikkert", + "Open wallet": "Åpne lommebok", + "Checking passphrase": "Sjekker passordfrase", + "Enter Passphrase": "Oppgi Passordfrase", + "Invalid passphrase": "Ugyldig passordfrase", + "Enter your PIN": "Oppgi din PIN", + "Set a PIN for quick access": "Sett en PIN for hurtig tilgang", + "Review passphrase again": "Sjekk passordfrasen igjen", + "Open a different wallet": "Åpne en annen lommebok", + "Forgot PIN": "Forgot PIN", + "PIN must be a 4-digit number": "PIN må være et 4-sifret nummer", + "Verifying PIN": "Kontrollerer PIN", + "Setting PIN": "Setter PIN", + "This might take some time,": "Dette kan ta litt tid,", + "please be patient.": "vennligst vær tålmodig.", + "Your PIN is incorrect": "Din PIN er feil.", + "Request timeout. Please check your internet connection.": "Forespørsel utløpt. Vennligst sjekk din Internettforbindelse.", + "Could not save your details": "Kunne ikke lagre dine detaljer", + "We could not connect you to Waggle, please check your internet connection.": "Vi kunne ikke forbinde deg til Waggle, vennligst sjekk din Internettforbindelse.", + "Please enter a valid address to send to": "Vennligst skriv inn en gyldig adresse å sende til", + "Please enter an amount above": "Vennglist legg in mengde høyere enn %(dust)s", + "Some funds are temporarily unavailable. To send this transaction, you will need to wait for your pending transactions to be confirmed first (this should not take more than a few minutes).": "Noen midler er midlertidlig utilgjengelige. For å sende denne transaksjonen må du først vente til dine ventende midler er bekreftet (dette burde ikke ta mer enn noen få minutter).", + "What does this mean?": "Hva betyr dette?", + "It seems like you are trying to empty your wallet. Taking transaction fee into account, we estimated that the max amount you can send is. We have amended the value in the amount field for you": "Det virker som du prøver å tømme din lommebok. Inkludert transaksjonsavgift så har vi beregnet at den største mengden du kan sende er %(sendableBalance)s. Vi har endret verdien i mengde-feltet for deg.", + "You do not have enough funds in your wallet": "Du har ikke nok midler i din lommebok.", + "A name is required to set your profile on Hive": "Et navn kreves for å sette opp din Hive-profil", + "Uh Oh...": "Oisann...", + "Whoops!": "Oppsann!", + "Just saying...": "Bare nevner det...", + "Your browser does not support geolocation": "Din nettleser støtter ikke geoposisjonering", + "Unable to retrieve your location": "Ikke mulig å hente din plassering", + "Without a name, the payer would not be able to identify you on Waggle.": "Uten et navn vil ikke den som betaler kunne identifisere deg på Waggle.", + "cannot be blank": "%(blankField)s kan ikke være blankt", + "name": "navn", + "email": "epost", + "description": "beskrivelse", + "Change your details": "Endre dine detaljer", + "Your name": "Ditt navn", + "Gravatar email": "Gravatar epost", + "Submit": "Legg inn", + "Gravatar (globally recognised avatar) is a service that lets you re-use the same avatar across websites and apps by specifying an email address.": "Gravatar (globalt gjenkjent avatar) er en tjeneste som lar deg bruke den samme avataren på tvers av nettsider og applikasjoner ved å spesifisere din epost-adresse.", + "Create a gravatar": "Opprett en gravatar", + "Logout": "Logg out", + "Support": "Brukerstøtte", + "Send": "Send", + "Receive": "Motta", + "History": "Historie", + "Tokens": "Tokener", + "Waggle lets you broadcast your wallet address to other nearby Hive users by comparing GPS data. This data is deleted once you turn Waggle off.": "Waggle lar deg kringkaste din lommeboks adresse til andre Hive-brukere i nærheten ved å bruke GPS-data. Disse dataene slettes når Waggle skrus av.", + "Having problems?": "Trøbbel?", + "Description": "Beskrivelse", + "Your email address": "Din epost-adresse", + "Nevermind": "Glem det", + "Before you start using Waggle, you need to enter a name that will help others identify you.": "Før du tar i bruk Waggle må du legge inn et navn som hjelper andre å identifisere deg.", + "Save": "Lagre", + "Loading transactions...": "Loading transactions...", + "Your transaction history": "Din transaksjonshistorie", + "pending confirmation": "venter på bekreftelse", + "Received": "Mottat", + "You do not have any transactions yet": "Du har ingen transaksjoner ennå", + "Transaction Id:": "ID for transaksjon:", + "Transaction Fee:": "Transaksjonsavgift:", + "Inputs:": "Inputs:", + "Outputs:": "Outputs:", + "Sent to:": "Send til:", + "Your wallet address": "Din lommeboks adresse", + "Waggle": "Waggle", + "Turn Waggle on": "Skru Waggle på", + "Turn Waggle off": "Skru Waggle av", + "Checking your location": "Finner din posisjon", + "Broadcasting your location...": "Kringkaster din posisjon", + "Wallet address": "Adresse for lommebok", + "Amount": "Mengde", + "Exchange rate unavailable for the selected currency": "Vekslingskurs utilgjengelig for valgt valuta", + "Confirm": "Bekreft", + "No Hive users found nearby": "Ingen Hive-brukere funnet i nærheten", + "Search Again": "Let Igjen", + "Searching...": "Leter...", + "Searching your area for other Hive Web users": "Leter i ditt område for andre Hive Web-brukere", + "Confirm transaction": "Bekreft transaksjon", + "transaction fee": "transaksjonsavgift", + "Cancel": "Avbryt", + "Transaction Successful": "Transaksjon Gjennomført", + "Your transaction will appear in your history tab shortly.": "Din transaksjon vil vises i din historiefanen snart.", + "Close": "Lukk", + "Report": "Rapporter", + "Transaction Failed": "Transaksjon Feilet", + "Please make sure you are connected to the internet.": "Vennligst sørg for at du er forbundet til Internett.", + "Please describe what happened above. Below are network error logs that could help us identify your issue.": "Vennligst beskriv over hva som skjedde (kun engelsk). Nedenfor er noen logger over nettverksfeil som kan hjelpe oss med å finne ut hva som gikk galt. ", + "Sorry, Hive Wallet did not load.": "Beklager, Hive Lommebok lastet ikke.", + "Try updating your browser, or switching out of private browsing mode. If all else fails, download Chrome for your device.": "Prøv å oppdatere din nettleser eller skru av privatmodus. Om alt går galt, last ned Chrome for din enhet." +} \ No newline at end of file diff --git a/app/lib/i18n/translations/nl.json b/app/lib/i18n/translations/nl.json index 24fb1a10..a4c95d43 100644 --- a/app/lib/i18n/translations/nl.json +++ b/app/lib/i18n/translations/nl.json @@ -23,6 +23,7 @@ "Set a PIN for quick access": "Stel een Pincode in voor snelle toegang", "Review passphrase again": "Bekijk uw wachtwoordzin opnieuw", "Open a different wallet": "Open een andere portemonnee", + "Forgot PIN": "Forgot PIN", "PIN must be a 4-digit number": "Je pincode moet een 4-cijferig getal zijn", "Verifying PIN": "Pincode verifiëren", "Setting PIN": "Pincode instellen", @@ -68,11 +69,15 @@ "Nevermind": "Laat maar", "Before you start using Waggle, you need to enter a name that will help others identify you.": "Voordat u Waggle kunt gebruiken moet u een naam opgeven waarmee anderen u kunnen identificeren.\n", "Save": "Opslaan", + "Loading transactions...": "Loading transactions...", "Your transaction history": "Uw transactie geschiedenis", "pending confirmation": "in afwachting van een bevestiging", "Received": "Ontvangen", "You do not have any transactions yet": "Je hebt nog geen transacties", "Transaction Id:": "Transactie ID:", + "Transaction Fee:": "Transaction Fee:", + "Inputs:": "Inputs:", + "Outputs:": "Outputs:", "Sent to:": "Verstuurd naar:", "Your wallet address": "Uw portemonnee adres", "Waggle": "Waggle", diff --git a/app/lib/i18n/translations/pl.json b/app/lib/i18n/translations/pl.json index ec3d69c6..f52ef9ba 100644 --- a/app/lib/i18n/translations/pl.json +++ b/app/lib/i18n/translations/pl.json @@ -23,6 +23,7 @@ "Set a PIN for quick access": "Ustaw kod PIN dla łatwego dostępu", "Review passphrase again": "Sprawdź ponownie hasło", "Open a different wallet": "Otwórz inny portfel", + "Forgot PIN": "Forgot PIN", "PIN must be a 4-digit number": "Kod PIN musi być 4-cyfrowy", "Verifying PIN": "Weryfikacja kodu PIN", "Setting PIN": "Ustawienie kodu PIN", @@ -68,11 +69,15 @@ "Nevermind": "Nieważne", "Before you start using Waggle, you need to enter a name that will help others identify you.": "Zanim skorzystasz z Waggle, podaj imię lub nazwę - umożliwi to innym identyfikację ciebie.", "Save": "Zapisz", + "Loading transactions...": "Loading transactions...", "Your transaction history": "Historia transakcji", "pending confirmation": "oczekuje na potwierdzenie", "Received": "Otrzymane", "You do not have any transactions yet": "Nie wykonałeś jeszcze żadnych transakcji", "Transaction Id:": "ID transakcji:", + "Transaction Fee:": "Transaction Fee:", + "Inputs:": "Inputs:", + "Outputs:": "Outputs:", "Sent to:": "Wysłane do:", "Your wallet address": "Adres twojego portfela", "Waggle": "Waggle", diff --git a/app/lib/i18n/translations/ru.json b/app/lib/i18n/translations/ru.json new file mode 100644 index 00000000..da0d2ea6 --- /dev/null +++ b/app/lib/i18n/translations/ru.json @@ -0,0 +1,108 @@ +{ + "Back to hivewallet.com": "Вернуться на hivewallet.com", + "Create new wallet": "Создать новый кошелек", + "Open existing wallet": "Открыть существующий кошелек", + "We are about to generate your very own passphrase": "Сейчас вы создадите личную фразу-пароль", + "This keeps your account secure, and lets you open your wallet on multiple devices.": "Это обеспечивает безопасность ваших счетов, и позволяет доступ к вашему кошельку с разных устройств.", + "It is very important you write this down.": "Очень важно, чтобы вы это записали", + "Generate passphrase": "Создать фразу-пароль", + "Go back": "Назад", + "Generating": "Генерация", + "Decoding passphrase": "Декодирование фразы-пароля", + "Synchronizing Wallet": "Синхронизация кошелька", + "Set your PIN": "Установите ПИН", + "Your passphrase": "Ваша фраза-пароль", + "Your passphrase will not be shown again.": "Ваша фраза-пароль более не появится.", + "Without it you will lose access to your wallet.": "Без нее вы потеряете доступ к своему кошельку", + "I have written down or otherwise securely stored my passphrase": "Я записал, или как-то сохранил свою фразу-пароль", + "Open wallet": "Открыть кошелек", + "Checking passphrase": "Проверка фразы-пароля", + "Enter Passphrase": "Введите фразу-пароль", + "Invalid passphrase": "Неверная фраза-пароль", + "Enter your PIN": "Введите свой ПИН", + "Set a PIN for quick access": "Установите ПИН для быстрого доступа", + "Review passphrase again": "Повторите фразу-пароль", + "Open a different wallet": "Открыть другой кошелек", + "Forgot PIN": "Forgot PIN", + "PIN must be a 4-digit number": "ПИН должен состоять из 4 цифр", + "Verifying PIN": "Проверка ПИНа", + "Setting PIN": "Установка ПИНа", + "This might take some time,": "Это займет время,", + "please be patient.": "пожалуйста подождите.", + "Your PIN is incorrect": "Ваш ПИН неверен", + "Request timeout. Please check your internet connection.": "Запрос превысил время ожидания, проверьте соединение с Интернетом.", + "Could not save your details": "Невозможно сохранить данные", + "We could not connect you to Waggle, please check your internet connection.": "Невозможно соединиться с Waggle, проверьте соединение с Интернетом.", + "Please enter a valid address to send to": "Пожалуйста, введите правильный адрес получателя", + "Please enter an amount above": "Пожалуйста, введите сумму более %(dust)s", + "Some funds are temporarily unavailable. To send this transaction, you will need to wait for your pending transactions to be confirmed first (this should not take more than a few minutes).": "Некоторые средства временно недоступны. Чтобы сделать этот перевод, вам нужно дождаться подтверждения предыдущих (это займет несколько минут).", + "What does this mean?": "Что это означает?", + "It seems like you are trying to empty your wallet. Taking transaction fee into account, we estimated that the max amount you can send is. We have amended the value in the amount field for you": "Похоже, вы собираетесь очистить этот кошелек. Учитывая комиссию, вы можете перевести %(sendableBalance)s. Мы скорректировали сумму перевода с учетом этого.", + "You do not have enough funds in your wallet": "У вас недостаточно средств в кошельке.", + "A name is required to set your profile on Hive": "Для установки профиля в Hive требуется имя.", + "Uh Oh...": "Ах, черт!", + "Whoops!": "Фигня вышла!", + "Just saying...": "Ну, вот...", + "Your browser does not support geolocation": "Ваш браузер не поддерживает геолокацию", + "Unable to retrieve your location": "Невозможно определить ваше местонахождение", + "Without a name, the payer would not be able to identify you on Waggle.": "Без имени, отправитель не сможет найти вас в Waggle.", + "cannot be blank": "%(blankField)s не может быть пустым", + "name": "имя", + "email": "email", + "description": "описание", + "Change your details": "Изменить профиль", + "Your name": "Ваше имя", + "Gravatar email": "Gravatar email", + "Submit": "Ввести", + "Gravatar (globally recognised avatar) is a service that lets you re-use the same avatar across websites and apps by specifying an email address.": "Gravatar (глобальный аватар) - это сервис, позволяющий вам использовать один и тот же профиль на разных сайтах и приложениях через привязку email адреса.", + "Create a gravatar": "Создать Gravatar", + "Logout": "Выход", + "Support": "Поддержка", + "Send": "Отправить", + "Receive": "Получить", + "History": "История", + "Tokens": "Токены", + "Waggle lets you broadcast your wallet address to other nearby Hive users by comparing GPS data. This data is deleted once you turn Waggle off.": "Waggle позволяет вам сообщать адрес своего кошелька другим пользователям Hive поблизости, с помощью геолокации. Эти данные стираются, как только вы отключите Waggle.", + "Having problems?": "Какие-то проблемы?", + "Description": "Описание", + "Your email address": "Ваш email адрес", + "Nevermind": "Да ладно", + "Before you start using Waggle, you need to enter a name that will help others identify you.": "Прежде чем начать использовать Waggle, введите имя которое позволит другим опознать вас.", + "Save": "Сохранить", + "Loading transactions...": "Loading transactions...", + "Your transaction history": "История ваших транзакций", + "pending confirmation": "ожидание подтверждения", + "Received": "Получено", + "You do not have any transactions yet": "У вас пока нет транзакций", + "Transaction Id:": "Код транзакции:", + "Transaction Fee:": "Transaction Fee:", + "Inputs:": "Inputs:", + "Outputs:": "Outputs:", + "Sent to:": "Отправить:", + "Your wallet address": "Ваш адрес кошелька", + "Waggle": "Waggle", + "Turn Waggle on": "Включить Waggle", + "Turn Waggle off": "Отключить Waggle", + "Checking your location": "Проверяем ваше местонахождение", + "Broadcasting your location...": "Ваше местонахождение транслируется...", + "Wallet address": "Адрес кошелька", + "Amount": "Сумма", + "Exchange rate unavailable for the selected currency": "Обменный курс для выбранной валюты неизвестен", + "Confirm": "Подтверждение", + "No Hive users found nearby": "Поблизости нет пользователей Hive", + "Search Again": "Искать снова", + "Searching...": "Поиск...", + "Searching your area for other Hive Web users": "Ищем других Hive пользователей поблизости", + "Confirm transaction": "Подтвердить транзакции", + "transaction fee": "комиссия", + "Cancel": "Отмена", + "Transaction Successful": "Транзакция успешна", + "Your transaction will appear in your history tab shortly.": "Ваша транзакция скоро появится в истории", + "Close": "Закрыть", + "Report": "Сообщить", + "Transaction Failed": "Транзакция неуспешна", + "Please make sure you are connected to the internet.": "Убедитесь, что вы подключены к Интернету", + "Please describe what happened above. Below are network error logs that could help us identify your issue.": "Пожалуйста, опишите что случилось. Ниже логи сетевых ошибок, которые помогут нам найти проблему.", + "Sorry, Hive Wallet did not load.": "Извините, кошелек Hive не загрузился.", + "Try updating your browser, or switching out of private browsing mode. If all else fails, download Chrome for your device.": "Попробуйте обновить свой браузер, или изменить его режим конфиденциальности. Если ничего не получается, попробуйте браузер Chrome." +} \ No newline at end of file diff --git a/app/lib/i18n/translations/sr-latn-rs.json b/app/lib/i18n/translations/sr-latn-rs.json index 23ce257c..eb13b8a9 100644 --- a/app/lib/i18n/translations/sr-latn-rs.json +++ b/app/lib/i18n/translations/sr-latn-rs.json @@ -23,6 +23,7 @@ "Set a PIN for quick access": "Podesi PIN za brži pristup", "Review passphrase again": "Pregledaj lozinku ponovo", "Open a different wallet": "Otvori drugi novčanik", + "Forgot PIN": "Forgot PIN", "PIN must be a 4-digit number": "PIN mora da ima 4 cifre", "Verifying PIN": "Verifikacija PIN-a", "Setting PIN": "Podesavanje PIN-a", @@ -68,11 +69,15 @@ "Nevermind": "Nije bitno", "Before you start using Waggle, you need to enter a name that will help others identify you.": "Pre nego što počnete da koristite Waggle, potrebno je da unesete ime kako bi ostali mogli da vas identifikuju.", "Save": "Sačuvaj", + "Loading transactions...": "Loading transactions...", "Your transaction history": "Istorija vaših transakcija", "pending confirmation": "čeka se potvrda", "Received": "Primljeno", "You do not have any transactions yet": "Trenutno nemate transakcija", "Transaction Id:": "Identifikacija transakcije:", + "Transaction Fee:": "Transaction Fee:", + "Inputs:": "Inputs:", + "Outputs:": "Outputs:", "Sent to:": "Poslato:", "Your wallet address": "Adresa vašeg novčanika", "Waggle": "Waggle", diff --git a/app/lib/i18n/translations/sr.json b/app/lib/i18n/translations/sr.json index e68bf4d4..8fbe87d9 100644 --- a/app/lib/i18n/translations/sr.json +++ b/app/lib/i18n/translations/sr.json @@ -23,6 +23,7 @@ "Set a PIN for quick access": "Podesite PIN radi lakseg pristupa", "Review passphrase again": "Proverite lozinku jos jednom", "Open a different wallet": "Otvorite drugi novcanik", + "Forgot PIN": "Forgot PIN", "PIN must be a 4-digit number": "PIN mora da sadrzi 4 cifre", "Verifying PIN": "Verifikujem PIN", "Setting PIN": "Podesavanje PIN-a", @@ -68,11 +69,15 @@ "Nevermind": "Nije bitno", "Before you start using Waggle, you need to enter a name that will help others identify you.": "Pre nego sto pocnete da koristite Waggle, potrebno je da unesete ime kako bi ostali mogli da vas identifikuju.", "Save": "Sacuvaj", + "Loading transactions...": "Loading transactions...", "Your transaction history": "Istorijat vasih transakcija", "pending confirmation": "ceka se potvrda", "Received": "Primljeno", "You do not have any transactions yet": "Trenutno nemate transakcija", "Transaction Id:": "ID Transakcije:", + "Transaction Fee:": "Transaction Fee:", + "Inputs:": "Inputs:", + "Outputs:": "Outputs:", "Sent to:": "Posalji:", "Your wallet address": "Adresa vaseg novcanika", "Waggle": "Waggle", diff --git a/app/lib/i18n/translations/th.json b/app/lib/i18n/translations/th.json index e64c8431..4dd068d3 100644 --- a/app/lib/i18n/translations/th.json +++ b/app/lib/i18n/translations/th.json @@ -23,6 +23,7 @@ "Set a PIN for quick access": "ตั้งค่า PIN เพื่อให้เข้าถึงได้อย่างรวดเร็ว", "Review passphrase again": "ตรวจสอบวลีรหัสผ่านอีกครั้ง", "Open a different wallet": "เปิดใช้งานกระเป๋าเงินอื่น", + "Forgot PIN": "Forgot PIN", "PIN must be a 4-digit number": "PIN ต้องเป็นตัวเลข 4 ตัวเท่านั้น", "Verifying PIN": "ตรวจสอบ PIN", "Setting PIN": "ตั้งค่า PIN", @@ -68,11 +69,15 @@ "Nevermind": "ไม่เป็นไร", "Before you start using Waggle, you need to enter a name that will help others identify you.": "ก่อนจะเริ่มใช้งาน Waggle คุณจำเป็นต้องกรอกชื่อของคุณ เพื่อที่ผู้อื่นจะได้ระบุตัวตนของคุณได้", "Save": "บันทึก", + "Loading transactions...": "Loading transactions...", "Your transaction history": "ประวัติการทำธุรกรรมของคุณ", "pending confirmation": "กำลังส่งคำยืนยัน", "Received": "รับ", "You do not have any transactions yet": "คุณยังไม่มีการทำธุรกรรมในตอนนี้", "Transaction Id:": "ID การทำธุรกรรม", + "Transaction Fee:": "Transaction Fee:", + "Inputs:": "Inputs:", + "Outputs:": "Outputs:", "Sent to:": "ส่งถึง : ", "Your wallet address": "ที่อยู่กระเป๋าเงินของคุณ", "Waggle": "Waggle", diff --git a/app/lib/i18n/translations/uk.json b/app/lib/i18n/translations/uk.json index 023d1424..832c6940 100644 --- a/app/lib/i18n/translations/uk.json +++ b/app/lib/i18n/translations/uk.json @@ -23,6 +23,7 @@ "Set a PIN for quick access": "Встановити PIN-код для швидкого доступу", "Review passphrase again": "Перевірте пароль ще раз", "Open a different wallet": "Відкрити інший гаманець", + "Forgot PIN": "Forgot PIN", "PIN must be a 4-digit number": "PIN-код має містити 4 цифри", "Verifying PIN": "Перевірка PIN-коду", "Setting PIN": "Встановлення PIN-коду", @@ -68,11 +69,15 @@ "Nevermind": "Все гаразд.", "Before you start using Waggle, you need to enter a name that will help others identify you.": "Перед тим як почати використовувати Waggle, потрібно ввести Ваше ім'я, за яким інші зможуть вас ідентифікувати", "Save": "Зберегти", + "Loading transactions...": "Loading transactions...", "Your transaction history": "Історія Ваших транзакцій", "pending confirmation": "підтверждення очікується", "Received": "Отримано", "You do not have any transactions yet": "У Вас ще немає транзакцій", "Transaction Id:": "Ідентифікатор транзакції:", + "Transaction Fee:": "Transaction Fee:", + "Inputs:": "Inputs:", + "Outputs:": "Outputs:", "Sent to:": "Послати до:", "Your wallet address": "Адреса вашого гаманця", "Waggle": "Waggle", diff --git a/app/lib/i18n/translations/zh-cn.json b/app/lib/i18n/translations/zh-cn.json index 9cf2e0e0..c356cd86 100644 --- a/app/lib/i18n/translations/zh-cn.json +++ b/app/lib/i18n/translations/zh-cn.json @@ -22,7 +22,8 @@ "Enter your PIN": "输入登录口令", "Set a PIN for quick access": "设置一个登录口令,以便快速访问", "Review passphrase again": "再次检查安全种子", - "Open a different wallet": "打开一个不同的钱包", + "Open a different wallet": "打开另一个钱包", + "Forgot PIN": "Forgot PIN", "PIN must be a 4-digit number": "登录口令必须是4位数字", "Verifying PIN": "验证登录口令", "Setting PIN": "设置登录口令", @@ -68,11 +69,15 @@ "Nevermind": "算了", "Before you start using Waggle, you need to enter a name that will help others identify you.": "摇一摇需要您输入一个用户名,这将帮助别人识别你。", "Save": "保存", + "Loading transactions...": "Loading transactions...", "Your transaction history": "您的交易记录", "pending confirmation": "待确认", "Received": "确认", "You do not have any transactions yet": "您没有任何交易记录", "Transaction Id:": "交易ID:", + "Transaction Fee:": "Transaction Fee:", + "Inputs:": "Inputs:", + "Outputs:": "Outputs:", "Sent to:": "发送到:", "Your wallet address": "你的钱包地址", "Waggle": "摇一摇", diff --git a/app/lib/ticker-api/currencies.json b/app/lib/ticker-api/currencies.json index 68cfe1c0..e927805c 100644 --- a/app/lib/ticker-api/currencies.json +++ b/app/lib/ticker-api/currencies.json @@ -18,6 +18,7 @@ "SEK", "SGD", "TRY", + "UAH", "USD", "ZAR" ] diff --git a/app/lib/wallet/auth.js b/app/lib/wallet/auth.js index 3e2e0c62..074d9b42 100644 --- a/app/lib/wallet/auth.js +++ b/app/lib/wallet/auth.js @@ -39,6 +39,16 @@ function disablePin(wallet_id, pin, callback) { }) } +function resetPin(wallet_id, callback) { + xhr({ + uri: uriRoot + "/reset?wallet_id=" + wallet_id, + method: 'GET' + }, function(err, resp, body){ + var content = JSON.parse(body) + callback(content == null ? 'PIN reset failed' : content.error) + }) +} + function postCredentials(endpoint, wallet_id, pin, callback) { xhr({ uri: uriRoot + "/" + endpoint, @@ -58,5 +68,6 @@ module.exports = { register: register, login: login, exist: exist, - disablePin: disablePin + disablePin: disablePin, + resetPin: resetPin } diff --git a/app/lib/wallet/index.js b/app/lib/wallet/index.js index 05e904f2..13eabcad 100644 --- a/app/lib/wallet/index.js +++ b/app/lib/wallet/index.js @@ -1,6 +1,7 @@ 'use strict'; -var worker = new Worker('./worker.js') +var work = require('webworkify') +var worker = work(require('./worker.js')) var auth = require('./auth') var db = require('./db') var emitter = require('hive-emitter') @@ -10,10 +11,7 @@ var denominations = require('hive-denomination') var Wallet = require('cb-wallet') var validateSend = require('./validator') var rng = require('secure-random').randomBuffer - -var Bitcoin = require('bitcoinjs-lib') -var Transaction = Bitcoin.Transaction -var HDNode = Bitcoin.HDNode +var bitcoin = require('bitcoinjs-lib') var wallet = null var seed = null @@ -47,18 +45,38 @@ function createWallet(passphrase, network, callback) { }) } -function setPin(pin, network, callback) { +function callbackError(err, callbacks) { + callbacks.forEach(function(fn) { + if(fn != null) fn(err) + }) +} + +function setPin(pin, network, done, unspentsDone, balanceDone) { + var callbacks = [done, unspentsDone, balanceDone] auth.register(id, pin, function(err, token){ - if(err) return callback(err.error); + if(err) return callbackError(err.error, callbacks); emitter.emit('wallet-auth', {token: token, pin: pin}) var encrypted = AES.encrypt(seed, token) db.saveEncrypedSeed(id, encrypted, function(err){ - if(err) return callback(err); + if(err) return callbackError(err.error, callbacks); var accounts = getAccountsFromSeed(network) - initWallet(accounts.externalAccount, accounts.internalAccount, network, callback) + initWallet(accounts.externalAccount, accounts.internalAccount, network, + done, unspentsDone, balanceDone) + }) + }) +} + +function resetPin(callback) { + db.getCredentials(function(err, credentials){ + if(err) return callback(err); + + auth.resetPin(credentials.id, function() { + db.deleteCredentials(credentials, function(){ + callback('user_deleted') + }) }) }) } @@ -67,9 +85,10 @@ function disablePin(pin, callback) { auth.disablePin(id, pin, callback) } -function openWalletWithPin(pin, network, syncDone) { +function openWalletWithPin(pin, network, done, unspentsDone, balanceDone) { + var callbacks = [done, unspentsDone, balanceDone] db.getCredentials(function(err, credentials){ - if(err) return syncDone(err); + if(err) return callbackError(err, callbacks); var id = credentials.id var encryptedSeed = credentials.seed @@ -77,18 +96,18 @@ function openWalletWithPin(pin, network, syncDone) { if(err){ if(err.error === 'user_deleted') { return db.deleteCredentials(credentials, function(){ - syncDone(err.error); + callbackError(err.error, callbacks); }) } - return syncDone(err.error) + return callbackError(err.error, callbacks) } - emitter.emit('wallet-auth', {token: token, pin: pin}) - assignSeedAndId(AES.decrypt(encryptedSeed, token)) + emitter.emit('wallet-auth', {token: token, pin: pin}) var accounts = getAccountsFromSeed(network) - initWallet(accounts.externalAccount, accounts.internalAccount, network, syncDone) + initWallet(accounts.externalAccount, accounts.internalAccount, network, + done, unspentsDone, balanceDone) }) }) } @@ -102,8 +121,8 @@ function assignSeedAndId(s) { function getAccountsFromSeed(networkName, done) { emitter.emit('wallet-opening', 'Synchronizing Wallet') - var network = Bitcoin.networks[networkName] - var accountZero = HDNode.fromSeedHex(seed, network).deriveHardened(0) + var network = bitcoin.networks[networkName] + var accountZero = bitcoin.HDNode.fromSeedHex(seed, network).deriveHardened(0) return { externalAccount: accountZero.derive(0), @@ -111,40 +130,60 @@ function getAccountsFromSeed(networkName, done) { } } -function initWallet(externalAccount, internalAccount, networkName, done){ - var network = Bitcoin.networks[networkName] - new Wallet(externalAccount, internalAccount, networkName, function(err, w) { - if(err) return done(err) +function initWallet(externalAccount, internalAccount, networkName, done, unspentsDone, balanceDone){ + var network = bitcoin.networks[networkName] - wallet = w - wallet.denomination = denominations[networkName].default + wallet = new Wallet(externalAccount, internalAccount, networkName, function(err, w) { + if(err) return done(err) var txObjs = wallet.getTransactionHistory() done(null, txObjs.map(function(tx) { return parseTx(wallet, tx) })) - }) + }, unspentsDone, balanceDone) + + wallet.denomination = denominations[networkName].default } function parseTx(wallet, tx) { var id = tx.getId() var metadata = wallet.txMetadata[id] - var toAddress - if(metadata.value <= 0) { - var network = Bitcoin.networks[wallet.networkName] - toAddress = Bitcoin.Address.fromOutputScript(tx.outs[0].script, network).toString() - } + var network = bitcoin.networks[wallet.networkName] var timestamp = metadata.timestamp timestamp = timestamp ? timestamp * 1000 : new Date().getTime() + var node = wallet.txGraph.findNodeById(id) + var prevOutputs = node.prevNodes.reduce(function(inputs, n) { + inputs[n.id] = n.tx.outs + return inputs + }, {}) + + var inputs = tx.ins.map(function(input) { + var buffer = new Buffer(input.hash) + Array.prototype.reverse.call(buffer) + var inputTxId = buffer.toString('hex') + + return prevOutputs[inputTxId][input.index] + }) + return { id: id, amount: metadata.value, - toAddress: toAddress, timestamp: timestamp, confirmations: metadata.confirmations, - fee: metadata.fee + fee: metadata.fee, + ins: parseOutputs(inputs, network), + outs: parseOutputs(tx.outs, network) + } + + function parseOutputs(outputs, network) { + return outputs.map(function(output){ + return { + address: bitcoin.Address.fromOutputScript(output.script, network).toString(), + amount: output.value + } + }) } } @@ -177,6 +216,7 @@ module.exports = { openWalletWithPin: openWalletWithPin, createWallet: createWallet, setPin: setPin, + resetPin: resetPin, disablePin: disablePin, getWallet: getWallet, walletExists: walletExists, diff --git a/app/lib/wallet/package.json b/app/lib/wallet/package.json index a59769ec..f22886df 100644 --- a/app/lib/wallet/package.json +++ b/app/lib/wallet/package.json @@ -6,14 +6,10 @@ "author": "", "license": "GPL-2.0+", "dependencies": { - "bip39": "^2.0.0", - "cb-wallet": "^0.5.0", - "workerify": "git://github.com/weilu/workerify.git" - }, - "browserify": { - "transform": [ - "workerify" - ] + "bip39": "^2.1.2", + "bitcoinjs-lib": "^1.5.7", + "cb-wallet": "^0.10.7", + "webworkify": "^1.0.0" }, "devDependencies": { "sinon": "^1.10.3" diff --git a/app/lib/wallet/worker.js b/app/lib/wallet/worker.js index 6598c121..1d7a9378 100644 --- a/app/lib/wallet/worker.js +++ b/app/lib/wallet/worker.js @@ -2,16 +2,18 @@ var BIP39 = require('bip39') -self.addEventListener('message', function(e) { - var data = e.data || {} - var mnemonic = data.passphrase || BIP39.entropyToMnemonic(data.entropy) +module.exports = function (self) { + self.addEventListener('message', function(e) { + var data = e.data || {} + var mnemonic = data.passphrase || BIP39.entropyToMnemonic(data.entropy) - var valid = BIP39.validateMnemonic(mnemonic) - if(!valid) { - throw new Error('Invalid passphrase') - } - var seed = BIP39.mnemonicToSeedHex(mnemonic) + var valid = BIP39.validateMnemonic(mnemonic) + if(!valid) { + throw new Error('Invalid passphrase') + } + var seed = BIP39.mnemonicToSeedHex(mnemonic) - self.postMessage({seed: seed, mnemonic: mnemonic}) -}, false); + self.postMessage({seed: seed, mnemonic: mnemonic}) + }, false); +} diff --git a/app/pages/history/index.js b/app/pages/history/index.js index 929703b2..f4f6589d 100644 --- a/app/pages/history/index.js +++ b/app/pages/history/index.js @@ -19,24 +19,20 @@ module.exports = function(el){ var date = new Date(timestamp) return strftime('%b %d %l:%M %p', date) }, - truncate: function(amount) { - if(Math.abs(amount) > 0.00001) { - return toFixedFloor(amount, 5) - } else { - return amount - } - }, - satoshiToBtc: satoshiToBtc + satoshiToBtc: satoshiToBtc, + loadingTx: true } }) - emitter.on('transactions-loaded', function(newTxs){ + emitter.on('append-transactions', function(newTxs){ Array.prototype.unshift.apply(transactions, newTxs) ractive.set('transactions', transactions) + ractive.set('loadingTx', false) }) - emitter.on('update-transactions', function(newTxs) { + emitter.on('set-transactions', function(newTxs) { ractive.set('transactions', newTxs) + ractive.set('loadingTx', false) }) ractive.on('show-detail', function(event) { diff --git a/app/pages/history/index.ract b/app/pages/history/index.ract index 94dc3462..115f4c24 100644 --- a/app/pages/history/index.ract +++ b/app/pages/history/index.ract @@ -1,5 +1,10 @@
+ {{#loadingTx}} +
+
{{translate("Loading transactions...")}}
+
+ {{/loadingTx}} {{#transactions.length}}

{{translate("Your transaction history")}}

{{/transactions.length}} @@ -9,7 +14,7 @@
- {{amount > 0 ? '+' : ''}} {{truncate(satoshiToBtc(amount))}} + {{amount > 0 ? '+' : ''}} {{satoshiToBtc(amount)}}
{{#confirmations}} @@ -22,16 +27,18 @@
-
{{toAddress || translate('Received')}}
+
{{amount > 0 ? translate('Received') : outs[0].address}}
{{/transactions}} {{^transactions}} -
-
- {{>svg_help}} + {{^loadingTx}} +
+
+ {{>svg_help}} +
+
{{translate("You do not have any transactions yet")}}
-
{{translate("You do not have any transactions yet")}}
-
+ {{/loadingTx}} {{/transactions}}
diff --git a/app/pages/receive/index.js b/app/pages/receive/index.js index d33b4bc7..11f8b56a 100644 --- a/app/pages/receive/index.js +++ b/app/pages/receive/index.js @@ -24,6 +24,10 @@ module.exports = function(el){ } }) + emitter.on('balance-ready', function(){ + ractive.set('address', getAddress()) + }) + emitter.on('wallet-ready', function(){ ractive.set('address', getAddress()) }) diff --git a/app/widgets/auth/auth.js b/app/widgets/auth/auth.js index ffce0890..df091355 100644 --- a/app/widgets/auth/auth.js +++ b/app/widgets/auth/auth.js @@ -26,20 +26,44 @@ var Auth = Ractive.extend({ emitter.removeAllListeners('wallet-opening') }) + function onDoneError(err) { + if(err === 'user_deleted') { + return location.reload(false); + } + + emitter.emit('clear-pin') + + if(err === 'auth_failed') { + return showError({ message: 'Your PIN is incorrect' }) + } + + console.error(err) + return showError({ message: err.message }) + } + function onSyncDone(err, transactions) { self.set('opening', false) if(err) { - if(err === 'user_deleted') return location.reload(false); - emitter.emit('clear-pin') - return showError({ message: 'Your PIN is incorrect' }) + return onDoneError(err) } window.scrollTo( 0, 0 ) emitter.emit('wallet-ready') - emitter.emit('transactions-loaded', transactions) + emitter.emit('set-transactions', transactions) + } + + function onBalanceDone(err, balance) { + self.set('opening', false) + if(err) { + return onDoneError(err) + } + + window.scrollTo( 0, 0 ) + emitter.emit('balance-ready', balance) } this.onSyncDone = onSyncDone + this.onBalanceDone = onBalanceDone this.getNetwork = getNetwork } }) diff --git a/app/widgets/auth/choose/footer.ract b/app/widgets/auth/choose/footer.ract index 7538f801..6fddd80f 100644 --- a/app/widgets/auth/choose/footer.ract +++ b/app/widgets/auth/choose/footer.ract @@ -1,5 +1 @@ - - {{translate("Back to hivewallet.com")}} diff --git a/app/widgets/auth/pin/footer.ract b/app/widgets/auth/pin/footer.ract index 6e0d5698..24cc5a0a 100644 --- a/app/widgets/auth/pin/footer.ract +++ b/app/widgets/auth/pin/footer.ract @@ -8,6 +8,7 @@ {{^opening}}
{{translate("Open a different wallet")}} + {{translate("Forgot PIN")}}
{{/opening}} diff --git a/app/widgets/auth/pin/index.js b/app/widgets/auth/pin/index.js index 31be302d..497df226 100644 --- a/app/widgets/auth/pin/index.js +++ b/app/widgets/auth/pin/index.js @@ -89,6 +89,10 @@ module.exports = function(prevPage, data){ }) }) + ractive.on('reset-pin', function() { + Hive.resetPin(ractive.onSyncDone) + }) + ractive.on('back', function(){ if(prevPage) prevPage(data) ractive.teardown() @@ -100,11 +104,13 @@ module.exports = function(prevPage, data){ } function openWithPin(){ - Hive.openWalletWithPin(getPin(), ractive.getNetwork(), ractive.onSyncDone) + Hive.openWalletWithPin(getPin(), ractive.getNetwork(), + ractive.onSyncDone, null, ractive.onBalanceDone) } function setPin(){ - Hive.setPin(getPin(), ractive.getNetwork(), ractive.onSyncDone) + Hive.setPin(getPin(), ractive.getNetwork(), + ractive.onSyncDone, null, ractive.onBalanceDone) } return ractive diff --git a/app/widgets/header/index.js b/app/widgets/header/index.js index 454d8d2b..1b0beadb 100644 --- a/app/widgets/header/index.js +++ b/app/widgets/header/index.js @@ -30,19 +30,21 @@ module.exports = function(el){ } }) - emitter.on('wallet-ready', function(){ - var wallet = getWallet(); - ractive.set('bitcoinBalance', wallet.getBalance()) - ractive.set('denomination', wallet.denomination) + emitter.on('balance-ready', function(balance) { + ractive.set('bitcoinBalance', balance) + ractive.set('denomination', getWallet().denomination) db.get('systemInfo', function(err, info){ if(err) return console.error(err); ractive.set('fiatCurrency', info.preferredCurrency) }) }) + emitter.on('wallet-ready', function(){ + ractive.set('bitcoinBalance', getWallet().getBalance()) + }) + emitter.on('update-balance', function() { - var wallet = getWallet(); - ractive.set('bitcoinBalance', wallet.getBalance()) + ractive.set('bitcoinBalance', getWallet().getBalance()) }) ractive.on('toggle', function(){ @@ -71,7 +73,7 @@ module.exports = function(el){ if(err) return showError(err) cancelSpinner() emitter.emit('update-balance') - emitter.emit('update-transactions', txs) + emitter.emit('set-transactions', txs) }) } }) diff --git a/app/widgets/modal-confirm-send/index.js b/app/widgets/modal-confirm-send/index.js index a78c6863..fd5ddce6 100644 --- a/app/widgets/modal-confirm-send/index.js +++ b/app/widgets/modal-confirm-send/index.js @@ -46,7 +46,7 @@ function open(data){ // update balance & tx history emitter.emit('wallet-ready') - emitter.emit('transactions-loaded', [parseTx(wallet, tx)]) + emitter.emit('append-transactions', [parseTx(wallet, tx)]) }) }) diff --git a/app/widgets/modal-transaction-detail/_content.scss b/app/widgets/modal-transaction-detail/_content.scss index 777f30d2..c65a615b 100644 --- a/app/widgets/modal-transaction-detail/_content.scss +++ b/app/widgets/modal-transaction-detail/_content.scss @@ -55,6 +55,14 @@ border-radius: 5px; font-size: 14px; line-height: 1.8; + overflow: hidden; + + ._address { + float: left; + } + ._number { + float: right; + } } } diff --git a/app/widgets/modal-transaction-detail/content.ract b/app/widgets/modal-transaction-detail/content.ract index 78a0b2f4..15e41d54 100644 --- a/app/widgets/modal-transaction-detail/content.ract +++ b/app/widgets/modal-transaction-detail/content.ract @@ -7,7 +7,7 @@
- {{amount > 0 ? '+' : ''}} {{truncate(satoshiToBtc(amount))}} + {{amount > 0 ? '+' : ''}} {{satoshiToBtc(amount)}}
{{#confirmations}} @@ -22,11 +22,25 @@

{{translate("Transaction Id:")}}

{{id}} - {{#toAddress}} -

{{translate("Sent to:")}}

- {{toAddress}} - {{/toAddress}} +

{{translate("Transaction Fee:")}}

+ {{satoshiToBtc(fee)}} + +

{{translate("Inputs:")}}

+ + {{#ins}} + {{address}} + {{satoshiToBtc(amount)}} + {{/ins}} + + +

{{translate("Outputs:")}}

+ + {{#outs}} + {{address}} + {{satoshiToBtc(amount)}} + {{/outs}} + diff --git a/app/widgets/sidebar/index.ract b/app/widgets/sidebar/index.ract index eeb8be54..b17c0b6d 100644 --- a/app/widgets/sidebar/index.ract +++ b/app/widgets/sidebar/index.ract @@ -4,7 +4,7 @@ - v0.2.0 + v0.3.3 diff --git a/build.js b/build.js index e724446f..4e621c4a 100644 --- a/build.js +++ b/build.js @@ -9,7 +9,11 @@ task = process.argv.reduce(function(memo, arg) { return arg } return memo -}, false) || 'default' +}, false) || 'dev' + +if(task.indexOf('help') >= 0) { + return console.log("Available build tasks: " + Object.keys(require('./tasks')).sort().join(', ')) +} if(task === 'build') { var children = collectTasks() diff --git a/package.json b/package.json index 1692aa8c..66168352 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hive-js", - "version": "0.2.0", + "version": "0.3.3", "description": "", "main": "index.js", "scripts": { @@ -36,9 +36,8 @@ "async": "~0.9.0", "autoprefixer": "^2.2.0", "big.js": "^2.5.0", - "bitcoinjs-lib": "^1.0.0", "body-parser": "^1.6.2", - "browserify": "^5.9.1", + "browserify": "^6.3.2", "browserify-zepto": "~1.1.2", "browsernizr": "git://github.com/weilu/browsernizr#indexedDB", "compression": "^1.0.10", @@ -50,7 +49,6 @@ "events": "^1.0.0", "express": "^4.8.2", "fastclick": "~1.0.1", - "folderify": "~0.6.0", "geomodel": "~0.1.2", "glob": "^3.2.9", "glob-watcher": "0.0.6", @@ -58,7 +56,7 @@ "minimatch": "^1.0.0", "mkdirp": "^0.5.0", "node-sass": "^0.9.3", - "pouchdb": "2.2.3", + "pouchdb": "^3.2.0", "ractify": "~0.4.0", "ractive": "~0.4.0", "request": "^2.39.0", @@ -77,6 +75,7 @@ ] }, "engines": { - "node": ">=0.10.26" + "node": "~0.10.26", + "npm": "^2.1.0" } } diff --git a/server/auth.js b/server/auth.js index e73d3028..0789b12a 100644 --- a/server/auth.js +++ b/server/auth.js @@ -171,9 +171,26 @@ function deleteUser(user, callback) { }) } +function resetPin(name, callback) { + name = userPrefix + name + userDB.get(name, function (err, doc) { + if(err){ + if(err.error === 'not_found') { + return callback({error: 'user_deleted'}) + } + + console.error('error getting doc', err) + callback({error: 'auth_failed'}) + } else { + deleteUser(doc, callback) + } + }) +} + module.exports = { register: register, login: login, exist: exist, - disablePin: disablePin + disablePin: disablePin, + resetPin: resetPin } diff --git a/server/express.js b/server/express.js index bfae331b..3391f704 100644 --- a/server/express.js +++ b/server/express.js @@ -20,10 +20,15 @@ module.exports = function (){ if(isProduction()){ app.set('trust proxy', true) var proxyHost = process.env.PROXY_URL.replace("https://", '') + var proxyQueryIndex = proxyHost.indexOf('/?') + if(proxyQueryIndex > 0) { + proxyHost = proxyHost.substring(0, proxyQueryIndex) + } app.use(helmet.csp({ 'default-src': ["'self'"], + 'child-src': ["'self'", "blob:"], 'connect-src': [ - "'self'", + "'self'", "blob:", 'api.bitcoinaverage.com', 'chain.so', // tickers 'btc.blockr.io', 'tbtc.blockr.io', 'ltc.blockr.io', // blockchain APIs process.env.DB_HOST, proxyHost @@ -40,9 +45,9 @@ module.exports = function (){ app.use(helmet.nosniff()) app.use(helmet.xframe('sameorigin')) - var ninetyDaysInMilliseconds = 90 * 24 * 60 * 60 * 1000 + var hundredEightyDaysInMilliseconds = 180 * 24 * 60 * 60 * 1000 app.use(helmet.hsts({ - maxAge: ninetyDaysInMilliseconds, + maxAge: hundredEightyDaysInMilliseconds, includeSubdomains: true })) } @@ -116,6 +121,15 @@ module.exports = function (){ }) }) + app.get('/reset', function(req, res){ + var name = req.query.wallet_id + if (!name) return res.status(400).json({error: 'Bad request'}); + + auth.resetPin(name, function(err){ + res.status(200).send(err) + }) + }) + app.post('/location', function(req, res) { var args = prepareGeoData(req, res) diff --git a/tasks/index.js b/tasks/index.js index 003dbf7e..f8ec355f 100644 --- a/tasks/index.js +++ b/tasks/index.js @@ -16,7 +16,7 @@ var tasks = { transifexPush: require('./transifex').push } -tasks.default = function(){ +tasks.dev = function(){ async.parallel([ tasks.scripts, tasks.loader, tasks.html, tasks.styles, tasks.images ], function(){ tasks.watch() tasks.serve() diff --git a/tasks/transifex.js b/tasks/transifex.js index 70b9a4e4..75e7470f 100644 --- a/tasks/transifex.js +++ b/tasks/transifex.js @@ -23,6 +23,14 @@ function requestAPI(url, options, callback) { options = {} } + if(process.env.TRANSIFEX_USER == null) { + return callback(new Error('process.env.TRANSIFEX_USER is missing')) + } + + if(process.env.TRANSIFEX_PASSWORD == null) { + return callback(new Error('process.env.TRANSIFEX_PASSWORD is missing')) + } + options.url = url options.headers = { "Authorization": authHeader } if(options.json == undefined) options.json = true