1
0
mirror of https://github.com/oceanprotocol/react.git synced 2024-11-23 02:00:27 +01:00

pass through mpAddress

This commit is contained in:
Matthias Kretschmann 2020-10-09 20:29:20 +02:00
parent 931af239f1
commit d0d7866ad9
Signed by: m
GPG Key ID: 606EEEF3C479A91F

View File

@ -8,7 +8,8 @@ interface UseConsume {
consume: (
did: DID | string,
dataTokenAddress: string,
serviceType: ServiceType
serviceType: ServiceType,
marketFeeAddress: string
) => Promise<void>
consumeStep?: number
consumeStepText?: string
@ -39,7 +40,8 @@ function useConsume(): UseConsume {
async function consume(
did: DID | string,
dataTokenAddress: string,
serviceType: ServiceType = 'access'
serviceType: ServiceType = 'access',
marketFeeAddress: string
): Promise<void> {
if (!ocean || !account || !accountId) return
setIsLoading(true)
@ -53,7 +55,9 @@ function useConsume(): UseConsume {
const tokenTransfer = await ocean.assets.order(
did as string,
serviceType,
accountId
accountId,
undefined,
marketFeeAddress
)
Logger.log('order created', tokenTransfer)
setStep(2)