fix: correct place to plug confirm
This commit is contained in:
parent
5bb912007d
commit
4d290d92f3
|
@ -92,7 +92,7 @@ method requestStorage(market: OnChainMarket, request: StorageRequest){.async.} =
|
|||
convertEthersError:
|
||||
debug "Requesting storage"
|
||||
await market.approveFunds(request.price())
|
||||
await market.contract.requestStorage(request)
|
||||
discard await market.contract.requestStorage(request).confirm(1)
|
||||
|
||||
method getRequest(market: OnChainMarket,
|
||||
id: RequestId): Future[?StorageRequest] {.async.} =
|
||||
|
|
|
@ -42,7 +42,7 @@ proc slashMisses*(marketplace: Marketplace): UInt256 {.contract, view.}
|
|||
proc slashPercentage*(marketplace: Marketplace): UInt256 {.contract, view.}
|
||||
proc minCollateralThreshold*(marketplace: Marketplace): UInt256 {.contract, view.}
|
||||
|
||||
proc requestStorage*(marketplace: Marketplace, request: StorageRequest) {.contract.}
|
||||
proc requestStorage*(marketplace: Marketplace, request: StorageRequest): ?TransactionResponse {.contract.}
|
||||
proc fillSlot*(marketplace: Marketplace, requestId: RequestId, slotIndex: UInt256, proof: Groth16Proof) {.contract.}
|
||||
proc withdrawFunds*(marketplace: Marketplace, requestId: RequestId) {.contract.}
|
||||
proc freeSlot*(marketplace: Marketplace, id: SlotId) {.contract.}
|
||||
|
|
|
@ -14,5 +14,5 @@ method run*(state: PurchasePending, machine: Machine): Future[?State] {.async.}
|
|||
codex_purchases_pending.inc()
|
||||
let purchase = Purchase(machine)
|
||||
let request = !purchase.request
|
||||
await purchase.market.requestStorage(request).confirm(1)
|
||||
await purchase.market.requestStorage(request)
|
||||
return some State(PurchaseSubmitted())
|
||||
|
|
Loading…
Reference in New Issue