emizzle e0e1487643 refactor: replace transaction modal reset functionality
The transaction component's `reset` functionality was meant ot reset a form when the modal was closed. It was difficult to manage and added extra overhead for each additional transaction modal created.

Instead of using reset functions, we can use Loaders to load and destroy the modal's as they are opened and closed. We do not need to keep them in memory and then also reset their functions. It creates a smaller memory footprint to destroy the object and reload on open.

feat: load gas prediction prices asynchronously
2020-11-26 11:17:24 -05:00

44 lines
1.2 KiB
QML

import QtQuick 2.13
import QtQuick.Controls 2.13
import QtQuick.Layouts 1.13
import QtQuick.Dialogs 1.3
import "../../../../../../imports"
import "../../../../../../shared"
import "../../../../../../shared/status"
ModalPopup {
id: root
title: qsTr("Select account")
height: 284
property alias accountSelector: selectFromAccount
signal selectAndShareAddressButtonClicked()
TransactionFormGroup {
anchors.fill: parent
anchors.leftMargin: Style.current.padding
anchors.rightMargin: Style.current.padding
AccountSelector {
id: selectFromAccount
accounts: walletModel.accounts
currency: walletModel.defaultCurrency
width: parent.width
//% "Choose account"
label: qsTr("Select account to share and receive assets")
}
}
footer: Item {
id: footerContainer
width: parent.width
height: children[0].height
StatusButton {
anchors.right: parent.right
anchors.rightMargin: Style.current.smallPadding
text: qsTr("Confirm and share address")
anchors.bottom: parent.bottom
onClicked: root.selectAndShareAddressButtonClicked()
}
}
}