mirror of
https://github.com/status-im/nim-codex.git
synced 2025-01-22 08:39:14 +00:00
[purchasing] Fix integration test
This commit is contained in:
parent
4a4588e2a0
commit
bd2fba50c7
@ -24,7 +24,7 @@ type
|
||||
offerExpiryMargin: UInt256
|
||||
request*: StorageRequest
|
||||
offers*: seq[StorageOffer]
|
||||
selected*: ?StorageOffer
|
||||
selected*: ?Address
|
||||
PurchaseTimeout* = Timeout
|
||||
|
||||
const DefaultProofProbability = 100.u256
|
||||
@ -85,6 +85,7 @@ proc run(purchase: Purchase) {.async.} =
|
||||
let subscription = await market.subscribeFulfillment(request.id, callback)
|
||||
try:
|
||||
await done
|
||||
purchase.selected = await market.getHost(request.id)
|
||||
finally:
|
||||
await subscription.unsubscribe()
|
||||
|
||||
|
@ -107,5 +107,5 @@ ethersuite "Integration tests":
|
||||
let purchase = waitFor upload().buy().finish()
|
||||
|
||||
check purchase["error"].getStr == ""
|
||||
check purchase["selected"].len > 0
|
||||
check purchase["selected"].getStr == $accounts[1]
|
||||
check available().len == 0
|
||||
|
Loading…
x
Reference in New Issue
Block a user