mirror of
https://github.com/lnbits/lnbits.git
synced 2025-09-23 17:59:31 +02:00
added address dialogue
This commit is contained in:
@@ -468,7 +468,44 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
getAddresses: function (walletID) {
|
||||||
|
var self = this
|
||||||
|
|
||||||
|
LNbits.api
|
||||||
|
.request(
|
||||||
|
'GET',
|
||||||
|
'/watchonly/api/v1/addresses/' + walletID,
|
||||||
|
this.g.user.wallets[0].inkey
|
||||||
|
)
|
||||||
|
.then(function (response) {
|
||||||
|
|
||||||
|
self.Addresses.data = response.data
|
||||||
|
self.currentaddress = self.Addresses.data[self.Addresses.data.length - 1].address
|
||||||
|
console.log(self.currentaddress)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
.catch(function (error) {
|
||||||
|
LNbits.utils.notifyApiError(error)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getFreshAddress: function (walletID) {
|
||||||
|
var self = this
|
||||||
|
|
||||||
|
LNbits.api
|
||||||
|
.request(
|
||||||
|
'GET',
|
||||||
|
'/watchonly/api/v1/address/' + walletID,
|
||||||
|
this.g.user.wallets[0].inkey
|
||||||
|
)
|
||||||
|
.then(function (response) {
|
||||||
|
console.log(response.data)
|
||||||
|
self.Addresses.data = response.data
|
||||||
|
self.currentaddress = self.Addresses.data[self.Addresses.data.length - 1].address
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
chargeRedirect: function (address){
|
chargeRedirect: function (address){
|
||||||
window.location.href = this.mempool.endpoint + "/address/" + address;
|
window.location.href = this.mempool.endpoint + "/address/" + address;
|
||||||
|
Reference in New Issue
Block a user