Wallet/src/js/services/uriHandler.js
Matias Alejo Garcia 320de62f13 bwc
2015-04-11 10:53:15 -03:00

14 lines
365 B
JavaScript

'use strict';
var UriHandler = function() {};
UriHandler.prototype.register = function() {
var base = window.location.origin + '/';
var url = base + '#/uri-payment/%s';
if(navigator.registerProtocolHandler) {
navigator.registerProtocolHandler('bitcoin', url, 'Copay');
}
};
angular.module('copayApp.services').value('uriHandler', new UriHandler());