Fix URI-payment for mobile

This commit is contained in:
Gustavo Maximiliano Cortez 2015-04-16 16:56:15 -03:00
commit c2f2ad95ca
5 changed files with 14 additions and 6 deletions

View file

@ -36,12 +36,15 @@ angular.module('copayApp.controllers').controller('paymentUriController',
this.getWallets = function() {
if (!profileService.profile) return;
var config = configService.getSync();
config.colorFor = config.colorFor || {};
var ret = lodash.map(profileService.profile.credentials, function(c) {
return {
m: c.m,
n: c.n,
name: c.walletName,
id: c.walletId,
color: config.colorFor[c.walletId] || '#2C3E50'
};
});
return lodash.sortBy(ret, 'walletName');

View file

@ -57,7 +57,9 @@ angular.element(document).ready(function() {
function handleBitcoinURI(url) {
if (!url) return;
window.location = '#/uri-payment/' + url;
setTimeout(function() {
window.location = '#/uri-payment/' + url;
}, 1000);
}
window.plugins.webintent.getUri(handleBitcoinURI);