mirror of
https://github.com/logos-blockchain/lez-programs.git
synced 2026-07-19 13:29:56 +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 {
|
||||
interval: 5000
|
||||
repeat: true
|
||||
running: root.pendingPoolProbes.length > 0
|
||||
running: root.active && root.pendingPoolProbes.length > 0
|
||||
onTriggered: root.pollPendingPool()
|
||||
}
|
||||
|
||||
@ -294,7 +294,7 @@ QtObject {
|
||||
|
||||
function pollPendingPool() {
|
||||
if (root.poolProbeInFlight || root.pendingPoolProbes.length === 0
|
||||
|| !root.backendReady)
|
||||
|| !root.backendReady || !root.active)
|
||||
return
|
||||
const pending = root.pendingPoolProbes[0]
|
||||
root.poolProbeInFlight = true
|
||||
|
||||
@ -37,6 +37,7 @@ TestCase {
|
||||
})
|
||||
property int contextRefreshCalls: 0
|
||||
property int contextRequestId: 0
|
||||
property int quoteCalls: 0
|
||||
property int submitCalls: 0
|
||||
property var lastContextRefreshRequest: ({})
|
||||
|
||||
@ -49,6 +50,7 @@ TestCase {
|
||||
}
|
||||
|
||||
function requestNewPositionQuote(request, requestId, forceRefresh) {
|
||||
++quoteCalls
|
||||
var result = JSON.parse(JSON.stringify(quoteResult || ({})))
|
||||
result.requestId = requestId
|
||||
newPositionQuoteResult = result
|
||||
@ -206,7 +208,16 @@ TestCase {
|
||||
|
||||
compare(page.flow.pendingPoolProbes.length, 1)
|
||||
compare(backend.contextRefreshCalls, 0)
|
||||
compare(backend.quoteCalls, 0)
|
||||
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() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user