From 820caa1643dbcba5e1a6689bc19a28d10fbcc908 Mon Sep 17 00:00:00 2001 From: Shalom Ogunshola <41871548+sogunshola@users.noreply.github.com> Date: Sat, 9 Jul 2022 01:07:13 +0100 Subject: [PATCH] fix(evmApi): syncNFTcontract update response --- .changeset/curly-boats-stare.md | 5 +++++ packages/evmApi/src/resolvers/token/syncNFTContract.ts | 8 ++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 .changeset/curly-boats-stare.md diff --git a/.changeset/curly-boats-stare.md b/.changeset/curly-boats-stare.md new file mode 100644 index 0000000000..92a4586752 --- /dev/null +++ b/.changeset/curly-boats-stare.md @@ -0,0 +1,5 @@ +--- +'@moralisweb3/evm-api': major +--- + +Perfromance improvement: Return object rather than undefined diff --git a/packages/evmApi/src/resolvers/token/syncNFTContract.ts b/packages/evmApi/src/resolvers/token/syncNFTContract.ts index dc84c99600..f03b156c6c 100644 --- a/packages/evmApi/src/resolvers/token/syncNFTContract.ts +++ b/packages/evmApi/src/resolvers/token/syncNFTContract.ts @@ -21,8 +21,12 @@ export interface Params extends Camelize> { export const syncNFTContractResolver = new EvmResolver({ name: 'syncNFTContract', getPath: (params: Params) => `nft/${params.address}/sync`, - apiToResult: (data: ApiResult) => ({}), - resultToJson: (data) => ({}), + apiToResult: (data: ApiResult) => ({ + success: true, + }), + resultToJson: (data) => ({ + success: true, + }), parseParams: (params: Params): ApiParams => ({ chain: resolveDefaultChain(params.chain).apiHex, address: EvmAddress.create(params.address).lowercase,