mirror of
https://github.com/logos-blockchain/lez-programs.git
synced 2026-07-20 05:50:32 +00:00
fix(amm): pause hidden pool probes
This commit is contained in:
parent
d51856a34f
commit
43cdc0dced
@ -72,7 +72,7 @@ QtObject {
|
|||||||
property Timer poolPoller: Timer {
|
property Timer poolPoller: Timer {
|
||||||
interval: 5000
|
interval: 5000
|
||||||
repeat: true
|
repeat: true
|
||||||
running: root.pendingPoolProbes.length > 0
|
running: root.active && root.pendingPoolProbes.length > 0
|
||||||
onTriggered: root.pollPendingPool()
|
onTriggered: root.pollPendingPool()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -294,7 +294,7 @@ QtObject {
|
|||||||
|
|
||||||
function pollPendingPool() {
|
function pollPendingPool() {
|
||||||
if (root.poolProbeInFlight || root.pendingPoolProbes.length === 0
|
if (root.poolProbeInFlight || root.pendingPoolProbes.length === 0
|
||||||
|| !root.backendReady)
|
|| !root.backendReady || !root.active)
|
||||||
return
|
return
|
||||||
const pending = root.pendingPoolProbes[0]
|
const pending = root.pendingPoolProbes[0]
|
||||||
root.poolProbeInFlight = true
|
root.poolProbeInFlight = true
|
||||||
|
|||||||
@ -37,6 +37,7 @@ TestCase {
|
|||||||
})
|
})
|
||||||
property int contextRefreshCalls: 0
|
property int contextRefreshCalls: 0
|
||||||
property int contextRequestId: 0
|
property int contextRequestId: 0
|
||||||
|
property int quoteCalls: 0
|
||||||
property int submitCalls: 0
|
property int submitCalls: 0
|
||||||
property var lastContextRefreshRequest: ({})
|
property var lastContextRefreshRequest: ({})
|
||||||
|
|
||||||
@ -49,6 +50,7 @@ TestCase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function requestNewPositionQuote(request, requestId, forceRefresh) {
|
function requestNewPositionQuote(request, requestId, forceRefresh) {
|
||||||
|
++quoteCalls
|
||||||
var result = JSON.parse(JSON.stringify(quoteResult || ({})))
|
var result = JSON.parse(JSON.stringify(quoteResult || ({})))
|
||||||
result.requestId = requestId
|
result.requestId = requestId
|
||||||
newPositionQuoteResult = result
|
newPositionQuoteResult = result
|
||||||
@ -206,7 +208,16 @@ TestCase {
|
|||||||
|
|
||||||
compare(page.flow.pendingPoolProbes.length, 1)
|
compare(page.flow.pendingPoolProbes.length, 1)
|
||||||
compare(backend.contextRefreshCalls, 0)
|
compare(backend.contextRefreshCalls, 0)
|
||||||
|
compare(backend.quoteCalls, 0)
|
||||||
verify(page.flow.selectedPoolCreationPending())
|
verify(page.flow.selectedPoolCreationPending())
|
||||||
|
|
||||||
|
page.flow.pollPendingPool()
|
||||||
|
compare(backend.quoteCalls, 0)
|
||||||
|
|
||||||
|
page.flow.active = true
|
||||||
|
wait(0)
|
||||||
|
page.flow.pollPendingPool()
|
||||||
|
compare(backend.quoteCalls, 1)
|
||||||
}
|
}
|
||||||
|
|
||||||
function test_activePoolSubmissionDoesNotStartPoolCreationProbe() {
|
function test_activePoolSubmissionDoesNotStartPoolCreationProbe() {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user