From e7f8e2c23523db63c5cadba45f7980dee9e49e7e Mon Sep 17 00:00:00 2001 From: Gustavo Maximiliano Cortez Date: Wed, 26 Jul 2017 16:13:57 -0300 Subject: [PATCH] Fix wording. Error handler improved --- src/js/controllers/buyMercadoLibre.js | 2 +- src/js/services/mercadoLibreService.js | 12 ++++----- src/sass/views/integrations/mercadolibre.scss | 11 ++++++++- www/img/mercado-libre/meli-card-24px.png | Bin 0 -> 1393 bytes www/views/amount.html | 2 +- www/views/buyMercadoLibre.html | 10 +++++--- www/views/mercadoLibre.html | 23 ++++++++++++------ www/views/mercadoLibreCards.html | 8 +++--- 8 files changed, 44 insertions(+), 24 deletions(-) create mode 100644 www/img/mercado-libre/meli-card-24px.png diff --git a/src/js/controllers/buyMercadoLibre.js b/src/js/controllers/buyMercadoLibre.js index 79e2c1edf..165719a1d 100644 --- a/src/js/controllers/buyMercadoLibre.js +++ b/src/js/controllers/buyMercadoLibre.js @@ -110,7 +110,7 @@ angular.module('copayApp.controllers').controller('buyMercadoLibreController', f var outputs = []; var toAddress = invoice.bitcoinAddress; - var amountSat = parseInt(invoice.btcDue * 100000000); // BTC to Satoshi + var amountSat = parseInt((invoice.btcDue * 100000000).toFixed(0)); // BTC to Satoshi outputs.push({ 'toAddress': toAddress, diff --git a/src/js/services/mercadoLibreService.js b/src/js/services/mercadoLibreService.js index eb07ac685..0db1549ce 100644 --- a/src/js/services/mercadoLibreService.js +++ b/src/js/services/mercadoLibreService.js @@ -26,14 +26,14 @@ angular.module('copayApp.services').factory('mercadoLibreService', function($htt var homeItem = { name: 'mercadoLibre', - title: 'Mercado Libre', + title: 'Mercado Livre Brazil Gift Cards', icon: 'icon-ml', sref: 'tabs.giftcards.mercadoLibre', }; var nextStepItem = { name: 'mercadoLibre', - title: 'Buy Mercado Libre Gift Cards', + title: 'Buy Mercado Livre Brazil Gift Cards', icon: 'icon-ml', sref: 'tabs.giftcards.mercadoLibre', }; @@ -112,7 +112,7 @@ angular.module('copayApp.services').factory('mercadoLibreService', function($htt $log.info('BitPay Create Invoice: SUCCESS'); return cb(null, data.data); }, function(data) { - $log.error('BitPay Create Invoice: ERROR ' + data.data.message); + $log.error('BitPay Create Invoice: ERROR', JSON.stringify(data.data)); return cb(data.data); }); }; @@ -122,8 +122,8 @@ angular.module('copayApp.services').factory('mercadoLibreService', function($htt $log.info('BitPay Get Invoice: SUCCESS'); return cb(null, data.data.data); }, function(data) { - $log.error('BitPay Get Invoice: ERROR ' + data.data.error); - return cb(data.data.error); + $log.error('BitPay Get Invoice: ERROR', JSON.stringify(data.data)); + return cb(data.data); }); }; @@ -140,7 +140,7 @@ angular.module('copayApp.services').factory('mercadoLibreService', function($htt $log.info('Mercado Libre Gift Card Create/Update: ' + status); return cb(null, data.data); }, function(data) { - $log.error('Mercado Libre Gift Card Create/Update: ', JSON.stringify(data.data)); + $log.error('Mercado Libre Gift Card Create/Update: ERROR', JSON.stringify(data.data)); return cb(data.data); }); }; diff --git a/src/sass/views/integrations/mercadolibre.scss b/src/sass/views/integrations/mercadolibre.scss index 54b0a7cfb..db8e6ecfe 100644 --- a/src/sass/views/integrations/mercadolibre.scss +++ b/src/sass/views/integrations/mercadolibre.scss @@ -41,7 +41,8 @@ } .big-icon-svg > .bg { - height: 27px; + height: 28px; + box-shadow: none; } } @@ -145,6 +146,14 @@ } } +#meli-list-cards { + img.item-logo { + width: auto; + height: auto; + border-radius: 0; + } +} + #meli-card { .card-head { margin: 20px 0; diff --git a/www/img/mercado-libre/meli-card-24px.png b/www/img/mercado-libre/meli-card-24px.png new file mode 100644 index 0000000000000000000000000000000000000000..2e42ef103feb6ca9dc4b3b02bc6e031ad3b4b9f4 GIT binary patch literal 1393 zcmeAS@N?(olHy`uVBq!ia0vp^sz5Bk!3HF2t4s=?Nk^)#sNw%$0gl~X?bAC~( zf~lUVo`I4bmx4`EN}5%WiyKrkkY}ruQBqQ1rLSLJUanVete0Puu5V~*X{m2uq;F)T z3sj+7T$xvrSfQI&tPC;&VunjnD>p{1Fbu92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@DH7 zzT5Xp_rLzts$UB47XHq-apmgkkp0o;OXU`QR?xm2vX4u=ylm@?ePLPe=cjkSyzTfm sf8o2gCN9llNi`kEFD>kMG`9H5@LlR?nMt&{5U8Z|boFyt=akR{0MZ$100000 literal 0 HcmV?d00001 diff --git a/www/views/amount.html b/www/views/amount.html index 062722793..5dfee29e5 100644 --- a/www/views/amount.html +++ b/www/views/amount.html @@ -1,7 +1,7 @@ - {{'Enter Amount' | translate}} + {{'Enter amount' | translate}} diff --git a/www/views/buyMercadoLibre.html b/www/views/buyMercadoLibre.html index eb15ae12a..16d5d2944 100644 --- a/www/views/buyMercadoLibre.html +++ b/www/views/buyMercadoLibre.html @@ -2,7 +2,9 @@ - Buy + + {{'Buy'|translate}} + @@ -14,7 +16,7 @@
- Mercado Libre Gift Card + Mercado Livre Brazil Gift Cards
{{amountUnitStr}}
@@ -60,13 +62,13 @@ ng-click="buyConfirm()" ng-if="!isCordova" click-send-status="sendStatus"> - Confirm purchase + {{'Confirm purchase'|translate}} - Slide to buy + {{'Slide to buy'|translate}} - Mercado Libre Gift Cards + + {{'Mercado Livre Brazil Gift Cards'|translate}} + @@ -13,13 +15,18 @@ -
- Gift Cards are only redeemable on Mercado Livre (Brazil) +
+ Only redeemable on Mercado Livre (Brazil)
- + + ng-click="openExternalLink('https://www.mercadolivre.com.br')" translate> + Visit mercadolivre.com.br → +
@@ -30,7 +37,7 @@
Mercado Libre -
+
Only redeemable on Mercado Livre (Brazil)
@@ -40,14 +47,14 @@ - Buy Gift Card + Buy a Gift Card - Your cards + Your Gift Cards
diff --git a/www/views/mercadoLibreCards.html b/www/views/mercadoLibreCards.html index 2888651fb..ba7eba1ec 100644 --- a/www/views/mercadoLibreCards.html +++ b/www/views/mercadoLibreCards.html @@ -1,8 +1,10 @@ - + - Your cards + + {{'Your Gift Cards'|translate}} + @@ -11,7 +13,7 @@ ng-click="openCardModal(item)" class="item item-avatar" ng-hide="hideCards"> - {{id}} + Error