From e925cb99b2f3b030dda1180f01a66f1fea9581fd Mon Sep 17 00:00:00 2001 From: Ludovic Levalleux Date: Wed, 22 Mar 2023 13:57:44 +0000 Subject: [PATCH] fix: fix return types for token mixins --- packages/core-sdk/src/erc1155/mixin.ts | 2 +- packages/core-sdk/src/erc20/mixin.ts | 14 +++++++------- packages/core-sdk/src/erc721/mixin.ts | 6 +++--- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/packages/core-sdk/src/erc1155/mixin.ts b/packages/core-sdk/src/erc1155/mixin.ts index 4b2807188..5566a6386 100644 --- a/packages/core-sdk/src/erc1155/mixin.ts +++ b/packages/core-sdk/src/erc1155/mixin.ts @@ -7,7 +7,7 @@ export class ERC1155Mixin extends BaseCoreSDK { /* -------------------------------------------------------------------------- */ public async erc1155BalanceOf( args: Omit[0], "web3Lib"> - ): Promise> { + ): ReturnType { return balanceOf({ web3Lib: this._web3Lib, ...args }); } } diff --git a/packages/core-sdk/src/erc20/mixin.ts b/packages/core-sdk/src/erc20/mixin.ts index 62f79fd5c..69f3c7779 100644 --- a/packages/core-sdk/src/erc20/mixin.ts +++ b/packages/core-sdk/src/erc20/mixin.ts @@ -15,43 +15,43 @@ export class ERC20Mixin extends BaseCoreSDK { /* -------------------------------------------------------------------------- */ public async erc20Approve( args: Omit[0], "web3Lib"> - ): Promise> { + ): ReturnType { return approve({ web3Lib: this._web3Lib, ...args }); } public async erc20GetAllowance( args: Omit[0], "web3Lib"> - ): Promise> { + ): ReturnType { return getAllowance({ web3Lib: this._web3Lib, ...args }); } public async erc20GetDecimals( args: Omit[0], "web3Lib"> - ): Promise> { + ): ReturnType { return getDecimals({ web3Lib: this._web3Lib, ...args }); } public async erc20GetSymbol( args: Omit[0], "web3Lib"> - ): Promise> { + ): ReturnType { return getSymbol({ web3Lib: this._web3Lib, ...args }); } public async erc20GetName( args: Omit[0], "web3Lib"> - ): Promise> { + ): ReturnType { return getName({ web3Lib: this._web3Lib, ...args }); } public async erc20EnsureAllowance( args: Omit[0], "web3Lib"> - ): Promise> { + ): ReturnType { return ensureAllowance({ web3Lib: this._web3Lib, ...args }); } public async erc20BalanceOf( args: Omit[0], "web3Lib"> - ): Promise> { + ): ReturnType { return balanceOf({ web3Lib: this._web3Lib, ...args }); } } diff --git a/packages/core-sdk/src/erc721/mixin.ts b/packages/core-sdk/src/erc721/mixin.ts index 120f8bc64..32ba148c7 100644 --- a/packages/core-sdk/src/erc721/mixin.ts +++ b/packages/core-sdk/src/erc721/mixin.ts @@ -7,19 +7,19 @@ export class ERC721Mixin extends BaseCoreSDK { /* -------------------------------------------------------------------------- */ public async erc721BalanceOf( args: Omit[0], "web3Lib"> - ): Promise> { + ): ReturnType { return balanceOf({ web3Lib: this._web3Lib, ...args }); } public async erc721OwnerOf( args: Omit[0], "web3Lib"> - ): Promise> { + ): ReturnType { return ownerOf({ web3Lib: this._web3Lib, ...args }); } public async erc721TokenOfOwnerByIndex( args: Omit[0], "web3Lib"> - ): Promise> { + ): ReturnType { return tokenOfOwnerByIndex({ web3Lib: this._web3Lib, ...args }); } }