From b65a7884a91c02ecf3c49d69b2975a3892bf0f7f Mon Sep 17 00:00:00 2001 From: Martin Macharia Date: Mon, 25 Sep 2023 18:20:19 +0200 Subject: [PATCH] Revert "Refactor to use internal methods" This reverts commit e703140e8a7099a1bb2e592a98418be32d6d278d. --- .../src/modules/nft/cc_commands/cc_transfer.ts | 7 +------ framework/src/modules/nft/method.ts | 15 ++------------- 2 files changed, 3 insertions(+), 19 deletions(-) diff --git a/framework/src/modules/nft/cc_commands/cc_transfer.ts b/framework/src/modules/nft/cc_commands/cc_transfer.ts index 45623fc635..06c78541df 100644 --- a/framework/src/modules/nft/cc_commands/cc_transfer.ts +++ b/framework/src/modules/nft/cc_commands/cc_transfer.ts @@ -119,12 +119,7 @@ export class CrossChainTransferCommand extends BaseCCCommand { } storeData.owner = recipientAddress; - await this._internalMethod.createNFTEntry( - getMethodContext(), - recipientAddress, - nftID, - storeData.attributesArray, - ); + await nftStore.save(getMethodContext(), nftID, storeData); await this._internalMethod.createUserEntry(getMethodContext(), recipientAddress, nftID); await escrowStore.del(getMethodContext(), escrowStore.getKey(sendingChainID, nftID)); } else { diff --git a/framework/src/modules/nft/method.ts b/framework/src/modules/nft/method.ts index 7f013dbacd..319906fd75 100644 --- a/framework/src/modules/nft/method.ts +++ b/framework/src/modules/nft/method.ts @@ -960,12 +960,7 @@ export class NFTMethod extends BaseMethod { storedAttributes, receivedAttributes, ); - await this._internalMethod.createNFTEntry( - methodContext, - nftData.owner, - nftID, - nftData.attributesArray, - ); + await nftStore.save(methodContext, nftID, nftData); await this._internalMethod.createUserEntry(methodContext, nftData.owner, nftID); await escrowStore.del(methodContext, escrowStore.getKey(terminatedChainID, nftID)); @@ -1002,13 +997,7 @@ export class NFTMethod extends BaseMethod { } else { nftData.attributesArray.push({ module, attributes }); } - - await this._internalMethod.createNFTEntry( - methodContext, - nftData.owner, - nftID, - nftData.attributesArray, - ); + await nftStore.save(methodContext, nftID, nftData); this.events.get(SetAttributesEvent).log(methodContext, { nftID,