Skip to content

Commit

Permalink
Chrome App Release v1.4
Browse files Browse the repository at this point in the history
Minor changes
- updated client side validation
- disable buttons during sending
- removed public key caching
  • Loading branch information
Administrator committed May 15, 2015
1 parent 709ff26 commit 4674a1a
Show file tree
Hide file tree
Showing 3 changed files with 126 additions and 61 deletions.
13 changes: 9 additions & 4 deletions src/ninki-engine.js
Original file line number Diff line number Diff line change
Expand Up @@ -2732,7 +2732,10 @@ function Engine() {
//if this is

//logic ot reset if any issue with cache/decryption
if (pubcache == '') {


//only cache on android
if (pubcache == '' || !m_this.Device.isCordova()) {

//derive the root node path and cache

Expand All @@ -2750,11 +2753,13 @@ function Engine() {
opubcache.coldKey = coldKey.toBase58();
opubcache.ninkiKey = ninkiKey.toBase58();


m_this.Device.setSecureStorageObject("pubcache" + cachepath, opubcache, m_this.m_deviceSecKey, m_this.encrypt);

pubcache = opubcache;

//only set this on mobile
if (m_this.Device.isCordova()) {
m_this.Device.setSecureStorageObject("pubcache" + cachepath, opubcache, m_this.m_deviceSecKey, m_this.encrypt);
}

}


Expand Down
25 changes: 13 additions & 12 deletions src/ninki-ui-mobile.js
Original file line number Diff line number Diff line change
Expand Up @@ -2461,7 +2461,7 @@ function UI() {

cordova.plugins.clipboard.paste(function (text) {

$('#toAddress').val(text);
$('#toAddress').val(text.trim());
$("#toAddress").trigger('change');

}, function () {
Expand Down Expand Up @@ -3534,9 +3534,9 @@ function UI() {

Engine.Device.getStorageItem("ok_disp", function (res) {

if (res == "1") {
if (!Engine.m_offlineKeyBackup || res == "1") {

bootbox.dialog({ title: '<div class="clear"><div class="h3 m-t-xs m-b-xs"><i class="fa fa-warning text-warning"></i>&nbsp;Security Warning</div><small class="text-muted"></small></div>', message: 'Backup your keys in Settings > Security Checklist.<br /><br />Currently, if you lose access to this device, you will lose access to any bitcoins you have stored in your wallet.', closeButton: false, buttons: {
bootbox.dialog({ title: '<div class="clear"><div class="h3 m-t-xs m-b-xs"><i class="fa fa-warning text-warning"></i>&nbsp;Security Warning</div><small class="text-muted"></small></div>', message: 'Backup your keys in Settings > Security Checklist.<br /><br />Currently, if you lose access to this application, you will lose access to any bitcoins you have stored in your wallet.', closeButton: false, buttons: {
main: {
label: "I Understand",
className: "btn-warning",
Expand Down Expand Up @@ -3697,7 +3697,8 @@ function UI() {

cordova.plugins.clipboard.paste(function (text) {

$("#txtCode").val(text);
text = text.replace(/\r?\n|\r/g, '');
$("#txtCode").val(text.trim());
$("#txtCode").trigger('change');

}, function () {
Expand Down Expand Up @@ -3970,8 +3971,8 @@ function UI() {
statusbox = '<i class=\"fa fa-times text-danger text-active\"></i> <span class="label bg-danger">Rejected</span>';
}

s += "<a style=\"border-top-left-radius: 0px;border-top-right-radius: 0px\" id=\"viewinvoicenetfrom" + _.escape(invoices[i].InvoiceFrom) + _.escape(invoices[i].InvoiceId) + "\" class=\"media list-group-item\"><div class=\"pull-left\">" + _.escape(timeLabel) + "</div>" +
"<div class=\"pull-right m-t-xs\">" + statusbox + "</div></a>";
s += "<div style=\"border-top-left-radius: 0px;border-top-right-radius: 0px\" id=\"viewinvoicenetfrom" + _.escape(invoices[i].InvoiceFrom) + _.escape(invoices[i].InvoiceId) + "\" class=\"media list-group-item\"><div class=\"pull-left\">" + _.escape(timeLabel) + "</div>" +
"<div class=\"pull-right m-t-xs\">" + statusbox + "</div></div>";
}

cachedInvoices = invoices;
Expand Down Expand Up @@ -4051,8 +4052,8 @@ function UI() {
statusbox = '<i class=\"fa fa-times text-danger text-active\"></i> <span class="label bg-danger">Rejected</span>';
}

s += "<a style=\"border-top-left-radius: 0px;border-top-right-radius: 0px\" id=\"viewinvoicenetby" + invoices[i].InvoiceFrom + invoices[i].InvoiceId + "\" class=\"media list-group-item\"><div class=\"pull-left\">" + _.escape(timeLabel) + "</div>" +
"<div class=\"pull-right m-t-xs\">" + statusbox + "</div></a>";
s += "<div style=\"border-top-left-radius: 0px;border-top-right-radius: 0px\" id=\"viewinvoicenetby" + invoices[i].InvoiceFrom + invoices[i].InvoiceId + "\" class=\"media list-group-item\"><div class=\"pull-left\">" + _.escape(timeLabel) + "</div>" +
"<div class=\"pull-right m-t-xs\">" + statusbox + "</div></div>";
}

cachedInvoicesByUser = invoices;
Expand Down Expand Up @@ -7662,11 +7663,11 @@ function UI() {

Engine.Device.getStorageItem("ok_disp", function (res) {

if (res == "1") {
if (!Engine.m_offlineKeyBackup || res == "1") {

if (currentBalanceInSatoshis >= 2500000) {

bootbox.dialog({ title: '<div class="clear"><div class="h3 m-t-xs m-b-xs"><i class="fa fa-warning text-warning"></i>&nbsp;Security Warning</div><small class="text-muted"></small></div>', message: 'Backup your keys in Settings > Security Checklist.<br /><br />Currently, if you lose access to this device, you will lose access to any bitcoins you have stored in your wallet.', closeButton: false, buttons: {
bootbox.dialog({ title: '<div class="clear"><div class="h3 m-t-xs m-b-xs"><i class="fa fa-warning text-warning"></i>&nbsp;Security Warning</div><small class="text-muted"></small></div>', message: 'Backup your keys in Settings > Security Checklist.<br /><br />Currently, if you lose access to this application, you will lose access to any bitcoins you have stored in your wallet.', closeButton: false, buttons: {
main: {
label: "I Understand",
className: "btn-warning",
Expand Down Expand Up @@ -7825,11 +7826,11 @@ function UI() {

Engine.Device.getStorageItem("ok_disp", function (res) {

if (res == "1") {
if (!Engine.m_offlineKeyBackup || res == "1") {

if (currentBalanceInSatoshis >= 2500000) {

bootbox.dialog({ title: '<div class="clear"><div class="h3 m-t-xs m-b-xs"><i class="fa fa-warning text-warning"></i>&nbsp;Security Warning</div><small class="text-muted"></small></div>', message: 'Backup your keys in Settings > Security Checklist.<br /><br />Currently, if you lose access to this device, you will lose access to any bitcoins you have stored in your wallet.', closeButton: false, buttons: {
bootbox.dialog({ title: '<div class="clear"><div class="h3 m-t-xs m-b-xs"><i class="fa fa-warning text-warning"></i>&nbsp;Security Warning</div><small class="text-muted"></small></div>', message: 'Backup your keys in Settings > Security Checklist.<br /><br />Currently, if you lose access to this application, you will lose access to any bitcoins you have stored in your wallet.', closeButton: false, buttons: {
main: {
label: "I Understand",
className: "btn-warning",
Expand Down
Loading

0 comments on commit 4674a1a

Please sign in to comment.