From 2935903a71211068ff8bd95a9a295947d633e450 Mon Sep 17 00:00:00 2001 From: Francisco Tobar Date: Wed, 3 Apr 2024 21:32:51 +0200 Subject: [PATCH] refactor(HttpEnvelopingRequest): await properties --- src/HttpEnvelopingRequest.ts | 42 +++++------------------------------- 1 file changed, 5 insertions(+), 37 deletions(-) diff --git a/src/HttpEnvelopingRequest.ts b/src/HttpEnvelopingRequest.ts index 77d111d..d3b1d86 100644 --- a/src/HttpEnvelopingRequest.ts +++ b/src/HttpEnvelopingRequest.ts @@ -1,7 +1,4 @@ -import type { - Either, - Modify, -} from '@rsksmart/rif-relay-client/dist/common/utility.types'; +import type { Either } from '@rsksmart/rif-relay-client/dist/common/utility.types'; import type { BigNumberish } from 'ethers'; import type { RelayRequestBody as ClientRelayRequestBody, @@ -11,40 +8,11 @@ import type { // IMPORTANT: The types defined here mirror the types defined in the client. // see EnvelopingTxRequest in the rif-relay-client library -export declare type RelayRequestBody = Modify< - ClientRelayRequestBody, - { - relayHub: string; - from: string; - to: string; - tokenContract: string; - value: BigNumberish; - gas: BigNumberish; - nonce: BigNumberish; - tokenAmount: BigNumberish; - tokenGas: BigNumberish; - validUntilTime: BigNumberish; - data: string; - } ->; +type Await = { [P in keyof T]: Awaited }; + +export declare type RelayRequestBody = Await; -export declare type DeployRequestBody = Modify< - ClientDeployRequestBody, - { - relayHub: string; - from: string; - to: string; - tokenContract: string; - recoverer: string; - value: BigNumberish; - nonce: BigNumberish; - tokenAmount: BigNumberish; - tokenGas: BigNumberish; - validUntilTime: BigNumberish; - index: BigNumberish; - data: string; - } ->; +export declare type DeployRequestBody = Await; export declare type EnvelopingMetadata = { relayHubAddress: RelayRequestBody['relayHub'];