feat: add ToastMessage when transaction becomes pending

This commit is contained in:
Jonathan Rainville 2020-09-11 13:31:13 -04:00 committed by Iuri Matias
parent 7fe2d8696f
commit 797da0a962
2 changed files with 9 additions and 13 deletions

View File

@ -20,16 +20,6 @@ ModalPopup {
icon: StandardIcon.Critical
standardButtons: StandardButton.Ok
}
property MessageDialog sendingSuccess: MessageDialog {
id: sendingSuccess
//% "Success sending the transaction"
title: qsTrId("success-sending-the-transaction")
icon: StandardIcon.NoIcon
standardButtons: StandardButton.Ok
onAccepted: {
root.close()
}
}
onClosed: {
stack.reset()
@ -274,10 +264,12 @@ ModalPopup {
return sendingError.open()
}
sendingSuccess.text = qsTr("Transaction sent to the blockchain. You can watch the progress on Etherscan: %2/%1").arg(response.result).arg(walletModel.etherscanLink)
sendingSuccess.open()
toastMessage.title = qsTr("Transaction pending...")
toastMessage.link = `${walletModel.etherscanLink}/${response.result}`
toastMessage.open()
root.close()
} catch (e) {
console.error('WOW', e)
console.error('Error parsing the response', e)
}
}
}

View File

@ -12,6 +12,10 @@ RowLayout {
Layout.fillHeight: true
Layout.fillWidth: true
ToastMessage {
id: toastMessage
}
TabBar {
id: tabBar
width: 78