Merge pull request #53 from colkito/fix/store-broadcast-new-address
added support for store and broadcast
This commit is contained in:
commit
be3989b0ba
2 changed files with 13 additions and 1 deletions
|
|
@ -15,7 +15,7 @@ angular.module('copay.home').controller('HomeController',
|
||||||
}
|
}
|
||||||
|
|
||||||
$scope.newAddr = function() {
|
$scope.newAddr = function() {
|
||||||
var a = $rootScope.wallet.publicKeyRing.generateAddress();
|
var a = $rootScope.wallet.generateAddress();
|
||||||
$scope.addrs.push({ addrStr: a.toString('hex') });
|
$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
|
// // HERE? not sure
|
||||||
// Wallet.prototype.cleanPeers = function() {
|
// Wallet.prototype.cleanPeers = function() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue