qml: consistency camelcase qewallet
This commit is contained in:
@@ -94,7 +94,7 @@ Pane {
|
|||||||
icon.source: '../../icons/delete.png'
|
icon.source: '../../icons/delete.png'
|
||||||
visible: listview.currentIndex >= 0
|
visible: listview.currentIndex >= 0
|
||||||
onClicked: {
|
onClicked: {
|
||||||
Daemon.currentWallet.delete_invoice(listview.currentItem.getKey())
|
Daemon.currentWallet.deleteInvoice(listview.currentItem.getKey())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
FlatButton {
|
FlatButton {
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ Pane {
|
|||||||
icon.source: '../../icons/delete.png'
|
icon.source: '../../icons/delete.png'
|
||||||
visible: listview.currentIndex >= 0
|
visible: listview.currentIndex >= 0
|
||||||
onClicked: {
|
onClicked: {
|
||||||
Daemon.currentWallet.delete_request(listview.currentItem.getKey())
|
Daemon.currentWallet.deleteRequest(listview.currentItem.getKey())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
FlatButton {
|
FlatButton {
|
||||||
|
|||||||
@@ -493,7 +493,7 @@ Pane {
|
|||||||
infotext: qsTr('If you forget your password, you\'ll need to restore from seed. Please make sure you have your seed stored safely')
|
infotext: qsTr('If you forget your password, you\'ll need to restore from seed. Please make sure you have your seed stored safely')
|
||||||
})
|
})
|
||||||
dialog.accepted.connect(function() {
|
dialog.accepted.connect(function() {
|
||||||
Daemon.currentWallet.set_password(dialog.password)
|
Daemon.currentWallet.setPassword(dialog.password)
|
||||||
})
|
})
|
||||||
dialog.open()
|
dialog.open()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -193,7 +193,7 @@ Item {
|
|||||||
}
|
}
|
||||||
onPressAndHold: {
|
onPressAndHold: {
|
||||||
Config.userKnowsPressAndHold = true
|
Config.userKnowsPressAndHold = true
|
||||||
Daemon.currentWallet.delete_expired_requests()
|
Daemon.currentWallet.deleteExpiredRequests()
|
||||||
app.stack.push(Qt.resolvedUrl('ReceiveRequests.qml'))
|
app.stack.push(Qt.resolvedUrl('ReceiveRequests.qml'))
|
||||||
AppController.haptic()
|
AppController.haptic()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -541,13 +541,13 @@ ApplicationWindow
|
|||||||
function handleAuthRequired(qtobject, method, authMessage) {
|
function handleAuthRequired(qtobject, method, authMessage) {
|
||||||
console.log('auth using method ' + method)
|
console.log('auth using method ' + method)
|
||||||
if (method == 'wallet') {
|
if (method == 'wallet') {
|
||||||
if (Daemon.currentWallet.verify_password('')) {
|
if (Daemon.currentWallet.verifyPassword('')) {
|
||||||
// wallet has no password
|
// wallet has no password
|
||||||
qtobject.authProceed()
|
qtobject.authProceed()
|
||||||
} else {
|
} else {
|
||||||
var dialog = app.passwordDialog.createObject(app, {'title': qsTr('Enter current password')})
|
var dialog = app.passwordDialog.createObject(app, {'title': qsTr('Enter current password')})
|
||||||
dialog.accepted.connect(function() {
|
dialog.accepted.connect(function() {
|
||||||
if (Daemon.currentWallet.verify_password(dialog.password)) {
|
if (Daemon.currentWallet.verifyPassword(dialog.password)) {
|
||||||
qtobject.authProceed()
|
qtobject.authProceed()
|
||||||
} else {
|
} else {
|
||||||
qtobject.authCancel()
|
qtobject.authCancel()
|
||||||
|
|||||||
@@ -614,7 +614,7 @@ class QEWallet(AuthMixin, QObject, QtEventListener):
|
|||||||
threading.Thread(target=pay_thread, daemon=True).start()
|
threading.Thread(target=pay_thread, daemon=True).start()
|
||||||
|
|
||||||
@pyqtSlot()
|
@pyqtSlot()
|
||||||
def delete_expired_requests(self):
|
def deleteExpiredRequests(self):
|
||||||
keys = self.wallet.delete_expired_requests()
|
keys = self.wallet.delete_expired_requests()
|
||||||
for key in keys:
|
for key in keys:
|
||||||
self.requestModel.delete_invoice(key)
|
self.requestModel.delete_invoice(key)
|
||||||
@@ -654,27 +654,19 @@ class QEWallet(AuthMixin, QObject, QtEventListener):
|
|||||||
self.requestCreateSuccess.emit(key)
|
self.requestCreateSuccess.emit(key)
|
||||||
|
|
||||||
@pyqtSlot(str)
|
@pyqtSlot(str)
|
||||||
def delete_request(self, key: str):
|
def deleteRequest(self, key: str):
|
||||||
self._logger.debug('delete req %s' % key)
|
self._logger.debug('delete req %s' % key)
|
||||||
self.wallet.delete_request(key)
|
self.wallet.delete_request(key)
|
||||||
self.requestModel.delete_invoice(key)
|
self.requestModel.delete_invoice(key)
|
||||||
|
|
||||||
@pyqtSlot(str, result='QVariant')
|
|
||||||
def get_request(self, key: str):
|
|
||||||
return self.requestModel.get_model_invoice(key)
|
|
||||||
|
|
||||||
@pyqtSlot(str)
|
@pyqtSlot(str)
|
||||||
def delete_invoice(self, key: str):
|
def deleteInvoice(self, key: str):
|
||||||
self._logger.debug('delete inv %s' % key)
|
self._logger.debug('delete inv %s' % key)
|
||||||
self.wallet.delete_invoice(key)
|
self.wallet.delete_invoice(key)
|
||||||
self.invoiceModel.delete_invoice(key)
|
self.invoiceModel.delete_invoice(key)
|
||||||
|
|
||||||
@pyqtSlot(str, result='QVariant')
|
|
||||||
def get_invoice(self, key: str):
|
|
||||||
return self.invoiceModel.get_model_invoice(key)
|
|
||||||
|
|
||||||
@pyqtSlot(str, result=bool)
|
@pyqtSlot(str, result=bool)
|
||||||
def verify_password(self, password):
|
def verifyPassword(self, password):
|
||||||
try:
|
try:
|
||||||
self.wallet.storage.check_password(password)
|
self.wallet.storage.check_password(password)
|
||||||
return True
|
return True
|
||||||
@@ -682,7 +674,7 @@ class QEWallet(AuthMixin, QObject, QtEventListener):
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
@pyqtSlot(str)
|
@pyqtSlot(str)
|
||||||
def set_password(self, password):
|
def setPassword(self, password):
|
||||||
if password == '':
|
if password == '':
|
||||||
password = None
|
password = None
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user