mirror of https://github.com/BTCPrivate/copay.git
Merge pull request #53 from colkito/fix/store-broadcast-new-address
added support for store and broadcast
This commit is contained in:
commit
be3989b0ba
|
@ -15,7 +15,7 @@ angular.module('copay.home').controller('HomeController',
|
|||
}
|
||||
|
||||
$scope.newAddr = function() {
|
||||
var a = $rootScope.wallet.publicKeyRing.generateAddress();
|
||||
var a = $rootScope.wallet.generateAddress();
|
||||
$scope.addrs.push({ addrStr: a.toString('hex') });
|
||||
};
|
||||
|
||||
|
|
|
@ -125,6 +125,18 @@ Wallet.prototype.sendPublicKeyRing = function(recipients) {
|
|||
});
|
||||
};
|
||||
|
||||
Wallet.prototype.generateAddress = function() {
|
||||
var addr = this.publicKeyRing.generateAddress();
|
||||
this.store();
|
||||
|
||||
this.network.send(null, {
|
||||
type: 'publicKeyRing',
|
||||
publicKeyRing: this.publicKeyRing.toObj(),
|
||||
walletId: this.id
|
||||
});
|
||||
|
||||
return addr;
|
||||
};
|
||||
|
||||
// // HERE? not sure
|
||||
// Wallet.prototype.cleanPeers = function() {
|
||||
|
|
Loading…
Reference in New Issue