2024-05-13 17:23:01 +00:00
|
|
|
import QtQuick 2.15
|
|
|
|
import QtQuick.Controls 2.15
|
|
|
|
import QtQuick.Layouts 1.15
|
2024-05-15 21:22:13 +00:00
|
|
|
import SortFilterProxyModel 0.2
|
2024-06-24 13:52:10 +00:00
|
|
|
import QtTest 1.15
|
2024-05-13 17:23:01 +00:00
|
|
|
|
2024-05-15 21:22:13 +00:00
|
|
|
import StatusQ 0.1
|
2024-07-12 09:46:43 +00:00
|
|
|
import StatusQ.Controls 0.1
|
2024-05-13 17:23:01 +00:00
|
|
|
import StatusQ.Core 0.1
|
2024-07-12 09:46:43 +00:00
|
|
|
import StatusQ.Core.Backpressure 0.1
|
2024-05-13 17:23:01 +00:00
|
|
|
import StatusQ.Core.Utils 0.1
|
|
|
|
|
|
|
|
import utils 1.0
|
|
|
|
import Storybook 1.0
|
|
|
|
import Models 1.0
|
|
|
|
|
2024-07-10 18:35:24 +00:00
|
|
|
import mainui 1.0
|
2024-05-15 21:22:13 +00:00
|
|
|
import shared.stores 1.0
|
2024-05-13 17:23:01 +00:00
|
|
|
import AppLayouts.Wallet.stores 1.0
|
|
|
|
import AppLayouts.Wallet.popups.swap 1.0
|
|
|
|
|
|
|
|
SplitView {
|
|
|
|
id: root
|
|
|
|
|
|
|
|
Logs { id: logs }
|
|
|
|
|
|
|
|
orientation: Qt.Horizontal
|
|
|
|
|
|
|
|
QtObject {
|
|
|
|
id: d
|
|
|
|
readonly property var tokenBySymbolModel: TokensBySymbolModel {}
|
2024-06-25 13:37:42 +00:00
|
|
|
|
2024-05-29 15:42:26 +00:00
|
|
|
function launchPopup() {
|
|
|
|
swapModal.createObject(root)
|
|
|
|
}
|
2024-06-06 14:05:31 +00:00
|
|
|
|
2024-07-10 18:35:24 +00:00
|
|
|
readonly property SwapTransactionRoutes dummySwapTransactionRoutes: SwapTransactionRoutes {}
|
2024-06-24 13:52:10 +00:00
|
|
|
|
|
|
|
property string uuid
|
|
|
|
|
|
|
|
function resetValues() {
|
|
|
|
accountComboBox.currentIndex = 0
|
|
|
|
fromTokenComboBox.currentIndex = 0
|
|
|
|
swapInput.text = ""
|
|
|
|
fetchSuggestedRoutesSpy.clear()
|
|
|
|
authenticateAndTransferSpy.clear()
|
|
|
|
}
|
2024-05-13 17:23:01 +00:00
|
|
|
}
|
|
|
|
|
2024-07-10 18:35:24 +00:00
|
|
|
Popups {
|
|
|
|
popupParent: root
|
|
|
|
rootStore: QtObject {}
|
|
|
|
communityTokensStore: QtObject {}
|
|
|
|
}
|
|
|
|
|
2024-05-13 17:23:01 +00:00
|
|
|
PopupBackground {
|
|
|
|
id: popupBg
|
|
|
|
|
|
|
|
SplitView.fillWidth: true
|
|
|
|
SplitView.fillHeight: true
|
|
|
|
|
|
|
|
Button {
|
|
|
|
id: reopenButton
|
|
|
|
anchors.centerIn: parent
|
|
|
|
text: "Reopen"
|
|
|
|
enabled: !swapModal.visible
|
|
|
|
|
2024-05-29 15:42:26 +00:00
|
|
|
onClicked: d.launchPopup()
|
2024-05-13 17:23:01 +00:00
|
|
|
}
|
|
|
|
|
2024-05-29 15:42:26 +00:00
|
|
|
Component.onCompleted: d.launchPopup()
|
|
|
|
|
2024-06-13 00:45:33 +00:00
|
|
|
SwapStore {
|
|
|
|
id: dSwapStore
|
2024-07-19 03:36:36 +00:00
|
|
|
signal suggestedRoutesReady(var txRoutes, string errCode, string errDescription)
|
2024-07-10 18:35:24 +00:00
|
|
|
signal transactionSent(var chainId, var txHash, var uuid, var error)
|
2024-06-24 13:52:10 +00:00
|
|
|
signal transactionSendingComplete(var txHash, var success)
|
|
|
|
|
2024-06-25 13:37:42 +00:00
|
|
|
readonly property var accounts: WalletAccountsModel {}
|
|
|
|
readonly property var flatNetworks: NetworksModel.flatNetworks
|
2024-06-13 00:45:33 +00:00
|
|
|
readonly property bool areTestNetworksEnabled: areTestNetworksEnabledCheckbox.checked
|
|
|
|
|
2024-06-30 22:08:08 +00:00
|
|
|
function fetchSuggestedRoutes(uuid, accountFrom, accountTo, amount, tokenFrom, tokenTo,
|
2024-06-13 00:45:33 +00:00
|
|
|
disabledFromChainIDs, disabledToChainIDs, preferredChainIDs, sendType, lockedInAmounts) {
|
2024-06-30 22:08:08 +00:00
|
|
|
console.debug("fetchSuggestedRoutes called >> uuid = ", uuid, " accountFrom = ", accountFrom, " accountTo =",
|
|
|
|
accountTo, "amount = ", amount, " tokenFrom = ", tokenFrom, " tokenTo = ", tokenTo,
|
|
|
|
" disabledFromChainIDs = ", disabledFromChainIDs, " disabledToChainIDs = ", disabledToChainIDs,
|
|
|
|
" preferredChainIDs = ", preferredChainIDs, " sendType =", sendType, " lockedInAmounts = ", lockedInAmounts)
|
2024-07-10 18:35:24 +00:00
|
|
|
d.uuid = uuid
|
2024-06-24 13:52:10 +00:00
|
|
|
fetchSuggestedRoutesSignal()
|
2024-06-13 00:45:33 +00:00
|
|
|
}
|
|
|
|
function authenticateAndTransfer(uuid, accountFrom, accountTo, tokenFrom,
|
|
|
|
tokenTo, sendType, tokenName, tokenIsOwnerToken, paths) {
|
|
|
|
console.debug("authenticateAndTransfer called >> uuid ", uuid, " accountFrom = ",accountFrom, " accountTo =",
|
|
|
|
accountTo, "tokenFrom = ",tokenFrom, " tokenTo = ",tokenTo, " sendType = ", sendType,
|
|
|
|
" tokenName = ", tokenName, " tokenIsOwnerToken = ", tokenIsOwnerToken, " paths = ", paths)
|
2024-06-24 13:52:10 +00:00
|
|
|
d.uuid = uuid
|
|
|
|
authenticateAndTransferSignal()
|
2024-06-13 00:45:33 +00:00
|
|
|
}
|
2024-06-24 13:52:10 +00:00
|
|
|
|
|
|
|
// only for testing
|
|
|
|
signal fetchSuggestedRoutesSignal()
|
|
|
|
signal authenticateAndTransferSignal()
|
|
|
|
}
|
|
|
|
|
|
|
|
SignalSpy {
|
|
|
|
id: fetchSuggestedRoutesSpy
|
|
|
|
target: dSwapStore
|
|
|
|
signalName: "fetchSuggestedRoutesSignal"
|
|
|
|
}
|
|
|
|
|
|
|
|
SignalSpy {
|
|
|
|
id: authenticateAndTransferSpy
|
|
|
|
target: dSwapStore
|
|
|
|
signalName: "authenticateAndTransferSignal"
|
2024-05-29 15:42:26 +00:00
|
|
|
}
|
|
|
|
|
2024-06-13 00:45:33 +00:00
|
|
|
TokensStore {
|
|
|
|
id: tokensStore
|
2024-06-25 13:37:42 +00:00
|
|
|
plainTokensBySymbolModel: TokensBySymbolModel {}
|
2024-06-13 00:45:33 +00:00
|
|
|
getDisplayAssetsBelowBalanceThresholdDisplayAmount: () => 0
|
2024-06-06 14:05:31 +00:00
|
|
|
}
|
|
|
|
|
2024-06-25 13:37:42 +00:00
|
|
|
SwapModalAdaptor {
|
|
|
|
id: adaptor
|
|
|
|
swapStore: dSwapStore
|
|
|
|
walletAssetsStore: WalletAssetsStore {
|
|
|
|
id: thisWalletAssetStore
|
|
|
|
walletTokensStore: tokensStore
|
|
|
|
readonly property var baseGroupedAccountAssetModel: GroupedAccountsAssetsModel {}
|
|
|
|
assetsWithFilteredBalances: thisWalletAssetStore.groupedAccountsAssetsModel
|
|
|
|
}
|
|
|
|
currencyStore: CurrenciesStore {}
|
|
|
|
swapFormData: SwapInputParamsForm {
|
2024-07-10 18:35:24 +00:00
|
|
|
defaultToTokenKey: Constants.swap.testStatusTokenKey
|
2024-06-25 13:37:42 +00:00
|
|
|
onSelectedAccountAddressChanged: {
|
|
|
|
if (selectedAccountAddress !== accountComboBox.currentValue)
|
|
|
|
accountComboBox.currentIndex = accountComboBox.indexOfValue(selectedAccountAddress)
|
|
|
|
}
|
|
|
|
}
|
2024-06-24 13:52:10 +00:00
|
|
|
swapOutputData: SwapOutputData {}
|
2024-06-25 13:37:42 +00:00
|
|
|
}
|
|
|
|
|
2024-05-29 15:42:26 +00:00
|
|
|
Component {
|
|
|
|
id: swapModal
|
|
|
|
SwapModal {
|
2024-06-13 00:45:33 +00:00
|
|
|
id: modal
|
2024-05-29 15:42:26 +00:00
|
|
|
visible: true
|
2024-06-04 11:58:37 +00:00
|
|
|
modal: false
|
|
|
|
closePolicy: Popup.CloseOnEscape
|
2024-06-12 20:43:08 +00:00
|
|
|
destroyOnClose: true
|
2024-06-25 13:37:42 +00:00
|
|
|
swapInputParamsForm: adaptor.swapFormData
|
|
|
|
swapAdaptor: adaptor
|
2024-07-10 18:35:24 +00:00
|
|
|
loginType: Constants.LoginType.Password
|
2024-06-13 00:45:33 +00:00
|
|
|
Binding {
|
|
|
|
target: swapInputParamsForm
|
|
|
|
property: "fromTokensKey"
|
2024-06-18 22:51:49 +00:00
|
|
|
value: fromTokenComboBox.currentValue ?? ""
|
2024-06-13 00:45:33 +00:00
|
|
|
}
|
|
|
|
Binding {
|
|
|
|
target: swapInputParamsForm
|
|
|
|
property: "toTokenKey"
|
2024-06-18 22:51:49 +00:00
|
|
|
value: toTokenComboBox.currentValue ?? ""
|
|
|
|
}
|
|
|
|
Binding {
|
|
|
|
target: swapInputParamsForm
|
|
|
|
property: "selectedNetworkChainId"
|
|
|
|
value: networksComboBox.currentValue ?? -1
|
|
|
|
}
|
|
|
|
Binding {
|
|
|
|
target: swapInputParamsForm
|
|
|
|
property: "selectedAccountAddress"
|
|
|
|
value: accountComboBox.currentValue ?? ""
|
|
|
|
}
|
|
|
|
Binding {
|
|
|
|
target: swapInputParamsForm
|
|
|
|
property: "fromTokenAmount"
|
|
|
|
value: swapInput.text
|
2024-06-13 00:45:33 +00:00
|
|
|
}
|
2024-06-24 13:52:10 +00:00
|
|
|
Binding {
|
|
|
|
target: swapInputParamsForm
|
|
|
|
property: "selectedNetworkChainId"
|
|
|
|
value: networksComboBox.currentValue ?? -1
|
|
|
|
}
|
|
|
|
Binding {
|
|
|
|
target: swapInputParamsForm
|
|
|
|
property: "selectedAccountAddress"
|
|
|
|
value: accountComboBox.currentValue ?? ""
|
|
|
|
}
|
|
|
|
Binding {
|
|
|
|
target: swapInputParamsForm
|
|
|
|
property: "fromTokenAmount"
|
|
|
|
value: swapInput.text
|
|
|
|
}
|
|
|
|
|
|
|
|
Connections {
|
|
|
|
target: approveTxButton
|
|
|
|
function onClicked() {
|
2024-07-10 18:35:24 +00:00
|
|
|
modal.swapAdaptor.sendApproveTx()
|
2024-06-24 13:52:10 +00:00
|
|
|
}
|
|
|
|
}
|
2024-05-15 21:22:13 +00:00
|
|
|
}
|
2024-05-13 17:23:01 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-06-24 13:52:10 +00:00
|
|
|
ScrollView {
|
2024-05-13 17:23:01 +00:00
|
|
|
id: rightPanel
|
|
|
|
SplitView.minimumWidth: 300
|
|
|
|
SplitView.preferredWidth: 300
|
|
|
|
SplitView.minimumHeight: 300
|
|
|
|
|
|
|
|
ColumnLayout {
|
|
|
|
spacing: 10
|
|
|
|
|
2024-05-15 21:22:13 +00:00
|
|
|
CheckBox {
|
|
|
|
id: areTestNetworksEnabledCheckbox
|
|
|
|
text: "areTestNetworksEnabled"
|
|
|
|
checked: true
|
2024-06-12 20:43:08 +00:00
|
|
|
onToggled: networksComboBox.currentIndex = 0
|
2024-05-15 21:22:13 +00:00
|
|
|
}
|
|
|
|
|
2024-05-13 17:23:01 +00:00
|
|
|
StatusBaseText {
|
|
|
|
text:"Selected Account"
|
|
|
|
}
|
|
|
|
ComboBox {
|
|
|
|
id: accountComboBox
|
|
|
|
textRole: "name"
|
2024-06-07 12:27:56 +00:00
|
|
|
valueRole: "address"
|
2024-06-25 13:37:42 +00:00
|
|
|
model: adaptor.nonWatchAccounts
|
2024-05-13 17:23:01 +00:00
|
|
|
currentIndex: 0
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusBaseText {
|
|
|
|
text: "Selected Network"
|
|
|
|
}
|
|
|
|
ComboBox {
|
|
|
|
id: networksComboBox
|
|
|
|
textRole: "chainName"
|
2024-06-18 22:51:49 +00:00
|
|
|
valueRole: "chainId"
|
2024-06-25 13:37:42 +00:00
|
|
|
model: adaptor.filteredFlatNetworksModel
|
2024-05-13 17:23:01 +00:00
|
|
|
currentIndex: 0
|
2024-05-15 21:22:13 +00:00
|
|
|
onCountChanged: currentIndex = 0
|
2024-05-13 17:23:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
StatusBaseText {
|
|
|
|
text: "From Token"
|
|
|
|
}
|
|
|
|
ComboBox {
|
|
|
|
id: fromTokenComboBox
|
|
|
|
textRole: "name"
|
2024-06-12 20:43:08 +00:00
|
|
|
valueRole: "key"
|
2024-05-13 17:23:01 +00:00
|
|
|
model: d.tokenBySymbolModel
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusInput {
|
|
|
|
id: swapInput
|
2024-06-18 22:51:49 +00:00
|
|
|
Layout.preferredWidth: 250
|
2024-05-28 17:39:41 +00:00
|
|
|
label: "Token amount to swap"
|
2024-06-13 00:45:33 +00:00
|
|
|
text: ""
|
2024-05-13 17:23:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
StatusBaseText {
|
|
|
|
text: "To Token"
|
|
|
|
}
|
|
|
|
ComboBox {
|
|
|
|
id: toTokenComboBox
|
|
|
|
textRole: "name"
|
2024-06-12 20:43:08 +00:00
|
|
|
valueRole: "key"
|
2024-05-13 17:23:01 +00:00
|
|
|
model: d.tokenBySymbolModel
|
|
|
|
currentIndex: 1
|
|
|
|
}
|
2024-06-04 11:58:37 +00:00
|
|
|
|
2024-06-24 13:52:10 +00:00
|
|
|
Button {
|
|
|
|
text: "simulate happy path no approval needed"
|
|
|
|
onClicked: {
|
|
|
|
d.resetValues()
|
|
|
|
fromTokenComboBox.currentIndex = 0
|
|
|
|
swapInput.text = "0.2"
|
|
|
|
fetchSuggestedRoutesSpy.wait()
|
|
|
|
Backpressure.debounce(this, 250, () => {
|
2024-07-19 03:36:36 +00:00
|
|
|
dSwapStore.suggestedRoutesReady(d.dummySwapTransactionRoutes.txHasRouteNoApproval, "", "")
|
2024-06-24 13:52:10 +00:00
|
|
|
})()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Button {
|
|
|
|
text: "simulate happy path with approval needed"
|
|
|
|
onClicked: {
|
|
|
|
d.resetValues()
|
|
|
|
accountComboBox.currentIndex = 2
|
|
|
|
fromTokenComboBox.currentIndex = 2
|
|
|
|
swapInput.text = "0.1"
|
|
|
|
fetchSuggestedRoutesSpy.wait()
|
|
|
|
Backpressure.debounce(this, 1000, () => {
|
2024-07-19 03:36:36 +00:00
|
|
|
dSwapStore.suggestedRoutesReady(d.dummySwapTransactionRoutes.txHasRoutesApprovalNeeded, "", "")
|
2024-06-24 13:52:10 +00:00
|
|
|
})()
|
|
|
|
Backpressure.debounce(this, 1500, () => {approveTxButton.clicked()})()
|
|
|
|
authenticateAndTransferSpy.wait()
|
|
|
|
Backpressure.debounce(this, 1000, () => {
|
|
|
|
dSwapStore.transactionSent(networksComboBox.currentValue, "0x877ffe47fc29340312611d4e833ab189fe4f4152b01cc9a05bb4125b81b2a89a", d.uuid, "")
|
|
|
|
})()
|
|
|
|
Backpressure.debounce(this, 2000, () => {
|
|
|
|
dSwapStore.transactionSendingComplete("0x877ffe47fc29340312611d4e833ab189fe4f4152b01cc9a05bb4125b81b2a89a", true)
|
|
|
|
})()
|
|
|
|
fetchSuggestedRoutesSpy.wait()
|
|
|
|
Backpressure.debounce(this, 1000, () => {
|
2024-07-19 03:36:36 +00:00
|
|
|
dSwapStore.suggestedRoutesReady(d.dummySwapTransactionRoutes.txHasRouteNoApproval, "", "")
|
2024-06-24 13:52:10 +00:00
|
|
|
})()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Button {
|
|
|
|
text: "simulate fetching proposal error"
|
|
|
|
onClicked: {
|
|
|
|
d.resetValues()
|
|
|
|
fromTokenComboBox.currentIndex = 0
|
|
|
|
swapInput.text = "0.2"
|
|
|
|
fetchSuggestedRoutesSpy.wait()
|
|
|
|
Backpressure.debounce(this, 250, () => {
|
2024-07-19 03:36:36 +00:00
|
|
|
dSwapStore.suggestedRoutesReady(d.dummySwapTransactionRoutes.txNoRoutes, "ERR-123", "Fetching proposal error")
|
2024-06-24 13:52:10 +00:00
|
|
|
|
|
|
|
})()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Button {
|
|
|
|
text: "simulate approval failed"
|
|
|
|
onClicked: {
|
|
|
|
d.resetValues()
|
|
|
|
accountComboBox.currentIndex = 2
|
|
|
|
fromTokenComboBox.currentIndex = 2
|
|
|
|
swapInput.text = "0.1"
|
|
|
|
fetchSuggestedRoutesSpy.wait()
|
|
|
|
Backpressure.debounce(this, 1000, () => {
|
2024-07-19 03:36:36 +00:00
|
|
|
dSwapStore.suggestedRoutesReady(d.dummySwapTransactionRoutes.txHasRoutesApprovalNeeded, "", "")
|
2024-06-24 13:52:10 +00:00
|
|
|
})()
|
|
|
|
Backpressure.debounce(this, 1500, () => {approveTxButton.clicked()})()
|
|
|
|
authenticateAndTransferSpy.wait()
|
|
|
|
Backpressure.debounce(this, 1000, () => {
|
|
|
|
dSwapStore.transactionSent(networksComboBox.currentValue, "0x877ffe47fc29340312611d4e833ab189fe4f4152b01cc9a05bb4125b81b2a89a", d.uuid, "")
|
|
|
|
})()
|
|
|
|
Backpressure.debounce(this, 2000, () => {
|
|
|
|
dSwapStore.transactionSendingComplete("0x877ffe47fc29340312611d4e833ab189fe4f4152b01cc9a05bb4125b81b2a89a", false)
|
|
|
|
})()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
CheckBox {
|
|
|
|
id: advancedSignalsCheckBox
|
|
|
|
text: "show advanced signals for testing"
|
|
|
|
checked: false
|
|
|
|
}
|
|
|
|
|
2024-07-19 03:36:36 +00:00
|
|
|
ComboBox {
|
|
|
|
id: routerErrorComboBox
|
|
|
|
model: [
|
|
|
|
{name: "errNotEnoughTokenBalance", value: Constants.swap.errorCodes.errNotEnoughTokenBalance},
|
|
|
|
{name: "errNotEnoughNativeBalance", value: Constants.swap.errorCodes.errNotEnoughNativeBalance},
|
|
|
|
{name: "errPriceTimeout", value: Constants.swap.errorCodes.errPriceTimeout},
|
2024-07-29 21:10:40 +00:00
|
|
|
{name: "errNotEnoughLiquidity", value: Constants.swap.errorCodes.errNotEnoughLiquidity},
|
|
|
|
{name: "errPriceImpactTooHigh", value: Constants.swap.errorCodes.errPriceImpactTooHigh}
|
2024-07-19 03:36:36 +00:00
|
|
|
]
|
|
|
|
textRole: "name"
|
|
|
|
valueRole: "value"
|
|
|
|
currentIndex: 0
|
|
|
|
visible: advancedSignalsCheckBox.checked
|
|
|
|
}
|
|
|
|
|
2024-06-06 14:05:31 +00:00
|
|
|
Button {
|
2024-07-19 03:36:36 +00:00
|
|
|
text: "emit no routes found event with error"
|
2024-06-06 14:05:31 +00:00
|
|
|
onClicked: {
|
2024-07-10 18:35:24 +00:00
|
|
|
const txRoutes = d.dummySwapTransactionRoutes.txNoRoutes
|
|
|
|
txRoutes.uuid = d.uuid
|
2024-07-19 03:36:36 +00:00
|
|
|
dSwapStore.suggestedRoutesReady(txRoutes, routerErrorComboBox.currentValue, "")
|
2024-06-06 14:05:31 +00:00
|
|
|
}
|
2024-06-24 13:52:10 +00:00
|
|
|
visible: advancedSignalsCheckBox.checked
|
2024-06-04 11:58:37 +00:00
|
|
|
}
|
|
|
|
|
2024-06-06 14:05:31 +00:00
|
|
|
Button {
|
|
|
|
text: "emit no approval needed route"
|
|
|
|
onClicked: {
|
2024-07-10 18:35:24 +00:00
|
|
|
const txRoutes = d.dummySwapTransactionRoutes.txHasRouteNoApproval
|
|
|
|
txRoutes.uuid = d.uuid
|
2024-07-19 03:36:36 +00:00
|
|
|
dSwapStore.suggestedRoutesReady(txRoutes, "", "")
|
2024-06-06 14:05:31 +00:00
|
|
|
}
|
2024-06-24 13:52:10 +00:00
|
|
|
visible: advancedSignalsCheckBox.checked
|
2024-06-04 11:58:37 +00:00
|
|
|
}
|
|
|
|
|
2024-06-06 14:05:31 +00:00
|
|
|
Button {
|
|
|
|
text: "emit approval needed route"
|
|
|
|
onClicked: {
|
2024-07-10 18:35:24 +00:00
|
|
|
const txRoutes = d.dummySwapTransactionRoutes.txHasRoutesApprovalNeeded
|
|
|
|
txRoutes.uuid = d.uuid
|
2024-07-19 03:36:36 +00:00
|
|
|
dSwapStore.suggestedRoutesReady(txRoutes, "", "")
|
2024-06-06 14:05:31 +00:00
|
|
|
}
|
2024-06-24 13:52:10 +00:00
|
|
|
visible: advancedSignalsCheckBox.checked
|
|
|
|
}
|
|
|
|
|
|
|
|
Button {
|
|
|
|
id: approveTxButton
|
|
|
|
text: "call approveTX"
|
|
|
|
visible: advancedSignalsCheckBox.checked
|
|
|
|
}
|
|
|
|
|
|
|
|
Button {
|
|
|
|
text: "emit transactionSent successful"
|
|
|
|
onClicked: {
|
|
|
|
dSwapStore.transactionSent(networksComboBox.currentValue, "0x877ffe47fc29340312611d4e833ab189fe4f4152b01cc9a05bb4125b81b2a89a", d.uuid, "")
|
|
|
|
}
|
|
|
|
visible: advancedSignalsCheckBox.checked
|
|
|
|
}
|
|
|
|
|
|
|
|
Button {
|
|
|
|
text: "emit transactionSent failure"
|
|
|
|
onClicked: {
|
|
|
|
dSwapStore.transactionSent(networksComboBox.currentValue, "", d.uuid, "no password given")
|
|
|
|
}
|
|
|
|
visible: advancedSignalsCheckBox.checked
|
|
|
|
}
|
|
|
|
|
|
|
|
Button {
|
|
|
|
text: "emit approval completed successfully"
|
|
|
|
onClicked: {
|
|
|
|
dSwapStore.transactionSendingComplete("0x877ffe47fc29340312611d4e833ab189fe4f4152b01cc9a05bb4125b81b2a89a", true)
|
|
|
|
}
|
|
|
|
visible: advancedSignalsCheckBox.checked
|
|
|
|
}
|
|
|
|
|
|
|
|
Button {
|
|
|
|
text: "emit approval completed with failure"
|
|
|
|
onClicked: {
|
|
|
|
dSwapStore.transactionSendingComplete("0x877ffe47fc29340312611d4e833ab189fe4f4152b01cc9a05bb4125b81b2a89a", false)
|
|
|
|
}
|
|
|
|
visible: advancedSignalsCheckBox.checked
|
2024-06-04 11:58:37 +00:00
|
|
|
}
|
2024-05-13 17:23:01 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// category: Popups
|