From 66b8da15d0fadcdd69c52513e9b4f04cefc1b146 Mon Sep 17 00:00:00 2001 From: paulo-ocean Date: Tue, 5 Nov 2024 16:54:14 +0000 Subject: [PATCH] minor fix --- src/@types/Compute.ts | 7 +++++++ test/integration/helpers.ts | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/@types/Compute.ts b/src/@types/Compute.ts index 83df541bf..26a6dbd07 100644 --- a/src/@types/Compute.ts +++ b/src/@types/Compute.ts @@ -60,6 +60,12 @@ export interface ComputeOutput { whitelist?: string[] } +export enum FileObjectType { + URL = 'url', + IPFS = 'ipfs', + ARWEAVE = 'arweave' +} + export enum EncryptMethod { AES = 'AES', ECIES = 'ECIES' @@ -78,6 +84,7 @@ export interface ComputeAsset { } export interface ComputeAlgorithm { + fileObject?: BaseFileObject // C2D v2 documentId?: string serviceId?: string meta?: MetadataAlgorithm diff --git a/test/integration/helpers.ts b/test/integration/helpers.ts index bafe4dea2..efafd5848 100644 --- a/test/integration/helpers.ts +++ b/test/integration/helpers.ts @@ -133,7 +133,8 @@ export async function handleComputeOrder( - have validOrder and providerFees -> then order is valid but providerFees are not valid, we need to call reuseOrder and pay only providerFees - no validOrder -> we need to call startOrder, to pay 1 DT & providerFees */ - if (order.providerFee && order.providerFee.providerFeeAmount) { + const hasProviderFees = order.providerFee && order.providerFee.providerFeeAmount + if (hasProviderFees && Number(order.providerFee.providerFeeAmount) > 0) { await approveWei( payerAccount, config,