2024-12-24 15:09:20 +01:00
|
|
|
/*
|
|
|
|
|
* This file is part of the Flowee project
|
|
|
|
|
* Copyright (C) 2024 Tom Zander <tom@flowee.org>
|
|
|
|
|
*
|
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
|
* (at your option) any later version.
|
|
|
|
|
*
|
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
*/
|
2024-12-26 23:27:24 +01:00
|
|
|
import QtQuick;
|
|
|
|
|
import QtQuick.Controls as QQC2;
|
|
|
|
|
import QtQuick.Layouts;
|
2024-12-24 15:09:20 +01:00
|
|
|
import "../mobile" as Mobile;
|
2024-12-26 23:27:24 +01:00
|
|
|
import "../Flowee" as Flowee;
|
2024-12-24 15:09:20 +01:00
|
|
|
import Flowee.org.pay;
|
|
|
|
|
import Flowee.org.pay.bigtransfer;
|
|
|
|
|
|
|
|
|
|
Mobile.Page {
|
|
|
|
|
id: root
|
2025-01-09 20:06:18 +01:00
|
|
|
headerText: qsTr("Wallet to Wallet")
|
2024-12-26 23:27:24 +01:00
|
|
|
property alias initialWallet: fromWalletSelector.startingAccount
|
2024-12-24 15:09:20 +01:00
|
|
|
|
2024-12-26 23:27:24 +01:00
|
|
|
ColumnLayout {
|
|
|
|
|
width: parent.width
|
2024-12-24 15:09:20 +01:00
|
|
|
spacing: 10
|
|
|
|
|
|
2024-12-26 23:27:24 +01:00
|
|
|
Flowee.Label {
|
|
|
|
|
Layout.fillWidth: true
|
|
|
|
|
wrapMode: Text.WordWrap
|
2025-01-09 20:06:18 +01:00
|
|
|
text: qsTr("Select two wallets to transfer funds simply, using anonimity preserving transactions.")
|
2024-12-26 23:27:24 +01:00
|
|
|
}
|
2024-12-24 15:09:20 +01:00
|
|
|
|
2024-12-26 23:27:24 +01:00
|
|
|
Mobile.PageTitledBox {
|
2025-01-09 20:06:18 +01:00
|
|
|
title: qsTr("Spending Wallet")
|
2024-12-29 19:13:22 +01:00
|
|
|
|
2024-12-26 23:27:24 +01:00
|
|
|
// TODO Popup with just the name
|
|
|
|
|
Mobile.AccountSelectorWidget {
|
|
|
|
|
id: fromWalletSelector
|
|
|
|
|
onSelectedAccountChanged: transferManager.fromAccount = selectedAccount;
|
|
|
|
|
}
|
|
|
|
|
GridLayout {
|
|
|
|
|
columns: 2
|
|
|
|
|
columnSpacing: 10
|
|
|
|
|
rowSpacing: 10
|
|
|
|
|
Flowee.Label {
|
|
|
|
|
text: qsTr("Addresses") + ":"
|
|
|
|
|
}
|
|
|
|
|
Flowee.Label {
|
|
|
|
|
text: transferManager.addressCount
|
|
|
|
|
}
|
|
|
|
|
Flowee.Label {
|
|
|
|
|
text: qsTr("Coins") + ":"
|
|
|
|
|
}
|
|
|
|
|
Flowee.Label {
|
|
|
|
|
text: transferManager.coinCount
|
|
|
|
|
}
|
|
|
|
|
}
|
2024-12-24 15:09:20 +01:00
|
|
|
}
|
|
|
|
|
Mobile.PageTitledBox {
|
|
|
|
|
title: qsTr("Destination Wallet")
|
2024-12-26 23:27:24 +01:00
|
|
|
// TODO Popup with just the name
|
|
|
|
|
// TODO add an entry "create new HD wallet"
|
|
|
|
|
Mobile.AccountSelectorWidget {
|
|
|
|
|
startingAccount: null
|
|
|
|
|
onSelectedAccountChanged: transferManager.toAccount = selectedAccount;
|
|
|
|
|
}
|
2024-12-24 15:09:20 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// button to start.
|
2024-12-26 23:27:24 +01:00
|
|
|
Flowee.Button {
|
|
|
|
|
Layout.alignment: Qt.AlignRight
|
|
|
|
|
text: qsTr("Prepare...")
|
|
|
|
|
|
2024-12-29 19:13:22 +01:00
|
|
|
enabled: transferManager.inputsOk
|
2024-12-26 23:27:24 +01:00
|
|
|
onClicked: {
|
|
|
|
|
transferManager.prepare();
|
|
|
|
|
thePile.push("ShowPrepared.qml", { "transferManager" : transferManager } );
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Item {
|
|
|
|
|
// data
|
|
|
|
|
TransferManager {
|
|
|
|
|
id: transferManager
|
|
|
|
|
}
|
2024-12-24 15:09:20 +01:00
|
|
|
}
|
|
|
|
|
}
|